Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

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
share|improve this answer
add comment

Your Answer

 
discard

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.