It's my understanding that caching is one of the main utilities of a proxy server. I'm currently trying to develop a simple one and I would like to know exactly how caching works.

Intuitively I think that it's basically an association between a request and a response. For example: for the following request: "GET google.com" you have the following response: "HTTP/1.0 200 OK..."

That way, whenever the proxy server receives a request for that URL he can reply with the cached response (I'm not really worried right now about when to serve the cached response and when to actually send the request to the real destination).

What I don't understand is how to establish the association between a request and a response since the HTTP response doesn't have any field saying "hey this is the response you get when you request the X URL" (or does it?).

Should I get this information by analyzing the underlying protocols? If so, how?

asked 02 Aug '13, 06:44

Andr%C3%A9%20Louren%C3%A7o's gravatar image

André Lourenço
1222
accept rate: 0%

Not really a wireshark question, you should look for answers on a support forum more appropriate, e.g. for squid.

(04 Aug '13, 08:17) grahamb ♦

This question is actually unrelated to Wireshark (as @grahamb already wrote). To understand HTTP caching, you need a profound understanding of the HTTP protocol and that's where Wireshark can help (besides online resources and books).

Wireshark Tutorial for HTTP (I did not check the quality of the content!)

http://www.youtube.com/watch?v=0wx9xfbe7B4

BTW: searching google for http caching explained returns these URLs and many more.

https://devcenter.heroku.com/articles/increasing-application-performance-with-http-cache-headers
http://www.mnot.net/cache_docs/
http://www.kaizou.org/2009/02/http-caching-explained/
http://tech.deepumohan.com/2012/08/http-caching-explained.html

Regards
Kurt

link

answered 08 Aug '13, 06:38

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
18.8k733180
accept rate: 15%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×184
×8
×1

Asked: 02 Aug '13, 06:44

Seen: 866 times

Last updated: 08 Aug '13, 06:38

powered by OSQA