How does Squid decide when to refresh a cached object?
When checking the object freshness, we calculate these values: • OBJ_DATE is the time when the object was given out by the origin server. This is taken from the HTTP Date reply header. • OBJ_LASTMOD is the time when the object was last modified, given by the HTTP Last-Modified reply header. • OBJ_AGE is how much the object has aged since it was retrieved: OBJ_AGE = NOW – OBJ_DATE • LM_AGE is how old the object was when it was retrieved: LM_AGE = OBJ_DATE – OBJ_LASTMOD • LM_FACTOR is the ratio of OBJ_AGE to LM_AGE: LM_FACTOR = OBJ_AGE / LM_AGE • CLIENT_MAX_AGE is the (optional) maximum object age the client will accept as taken from the HTTP/1.1 Cache-Control request header. • EXPIRES is the (optional) expiry time from the server reply headers. These values are compared with the parameters of the refresh_pattern rules. The refresh parameters are: • URL regular expression • CONF_MIN: The time (in minutes) an object without an explicit expiry time should be considered fresh. The recommend
“); and “refresh_pattern” from http://squid.visolve.com/squid/squid24s1/tuning.htm Is there currently a supported way to force the caching of all objects which are listed in the URLs above as non-cacheable? I believe we can work with existing features to ensure objects are not expired out for the duration of our tests (several months actually…) however I cannot at this point see a way to ensure that all objects are cached regardless of their content (e.g. all forms of Cache-Control header). I was hoping for perhaps some form of configure arguments but they don’t appear to exist. We are happy to modify the source if need be however I have little idea of where to start or what to look for. If source modification _is_ the only way forward I would greatly appreciate any pointers the list could give me regarding which source files, functions etc I should be looking at. Thanks list!