Is there a way to let squid check if cached contents are outdated?If cached contents ARE outdated,how to let squid fetch the newest contents from original server?
Asked
Active
Viewed 964 times
1
-
you should use SARG. – user128296 Mar 01 '13 at 08:46
1 Answers
3
Squid has an algorithm that calculates how long an object will be cached, based on when it was given out, when it was last modified, how long it is since it was retrieved, and any information from the Cache-Control request header and server reply headers. The complete algorithm is described in this Squid FAQ
If you want to clear the cache for a particular server, you must have allowed access to do so in the squid conf:
acl PURGE method PURGE
acl localhost src 127.0.0.1
http_access allow PURGE localhost
http_access deny PURGE
If that's done and the config re-read, you can use the squidclient program to clear the cache:
squidclient -m PURGE http://www.domainiwanttoclear.com/
You might also be interested in the cache manager that you should have gotten together with the rest of Squid.

Jenny D
- 27,780
- 21
- 75
- 114