OSQA is unmaintained. Help us figure out where to go from here.

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
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!)


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



permanent link

answered 08 Aug '13, 06:38

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
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



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

Question tags:


question asked: 02 Aug '13, 06:44

question was seen: 2,787 times

last updated: 08 Aug '13, 06:38

p​o​w​e​r​e​d by O​S​Q​A