2

I'm building a system to serve the same page (even though it's not fresh anymore) when requesting the same URL within a run which can be about an hour, so I try using squid cache to cache everything. I add this to squid.conf:

refresh_pattern ^http: 600000 100% 700000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-no-store ignore-must-revalidate ignore-auth

However, it doesn't seem to work when the HTTP response has "Vary: *" in the header. For example, I cannot cache http://stackoverflow.com. I'm using squid version 3.1.19, if that matters.

Is there a way to get around this?

2 Answers 2

0

"Vary: *" essentially means that there are factors other than headers in the HTTP request that determine the uniqueness of a request (for example, client IP address, etc), so a intermediate cache (squid) cannot really reliably cache.

Unfortunately, Squid has no mechanism for ignoring the Vary header, either completely or for select headers. I'm running into this problem myself.

0

Please try this setting

vary_ignore_expire on

Ref: http://www.squid-cache.org/Doc/config/vary_ignore_expire/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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