5

I'm having an issue here.
i setup my router with squid transparent proxy and also to do static files caching.
It can cache static files successfully. But it cannot cache static file with query string. Example: http://www.example.com/style.css => this will cache successfully
http://www.example.com/style.css?v=1.1 => this won't cache.

Does anyone know why and how to fix that?

9

The default configuration of Squid is to not cache dynamic content (which URLs with query strings are considered to be). That Squid wiki page explains how to change this. Basically you need to remove the following line from squid.conf:

cache deny QUERY

and replace it with these refresh patterns:

refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern .            0 20% 4320

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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