Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Do most popular proxy servers cache the response data based on the Uri? Also, lets exclude HTTP Headers like Cache-Control, etc... and assume they have been set to public, max-age: xxxx s-maxage: yyyyy etc...

So .. assuming the proxy server says 'this resource needs to be cached' .. what is the 'key'? the Uri?

so if i have


they are all separate cached items?

share|improve this question
up vote 0 down vote accepted

My understanding is that most commonly it's a hash of things related to the URL, such as the name/address of the host, path, and sometimes other options such as cgi args. According to this FAQ, Squid uses a hash of straight URL and the HTTP retrieval method to identify items already in the cache.

I think that the URLs you've listed would indeed cause separate cache items to be created in most cases.

share|improve this answer

I'm familiar with Squid. It definitely caches all your example URIs as separate objects. But please note that it's perfectly possible to configure Squid to not cache URIs matching certain pattern, such as those containing ?.

share|improve this answer

The URL is definitely a key parameter when it comes to caching. In fact speaking as a web developer, one way to prevent caching of web resources is to append a random query string to the end of the URL.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.