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

  • www.somedomain.com
  • www.somedomain.com/foo
  • www.somedomain.com/foo?
  • www.somedomain.com/foo?a=1
  • www.somedomain.com/foo?a=1&b=2

they are all separate cached items?

link|improve this question

feedback

2 Answers

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.

link|improve this answer
feedback

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 ?.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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