Search squid archive

Re: caching for 60 minutes, ignoring any header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Amos,

Thanks for your thorough response.
Please refer to my response to Eliezer.

Thanks!

On 23-Sep-13 07:29, Amos Jeffries wrote:
On 23/09/2013 3:01 p.m., Ron Klein wrote:
Hi,

I'm trying to cache all favicons files, named favicon.ico, located always in the root of the web site (when they exist, of course) I would like to ignore any caching instruction originates from the (real) web server response headers. For instance, if I get the "last modified" header, I'd like to ignore it.
I want the caching policy to be purely "mine".

FYI: Last-Modified is not caching policy. It is a timestamp telling when the object was last changed. *Your* caching policy relies on such details in order to calculate age teh same as teh default ones do.

And no there is no way to replace the caching features of HTTP with your own. All Squid does is allow you to tune the parameters used by the algorithm.



I use Squid 3 on Ubuntu 12.04 .
I created the following instruction in the configuration file:
refresh_pattern -i ^http(s?)://.*/favicon.ico$ 60 0% 60 ignore-private override-expire override-lastmod ignore-no-store

Erm...

"ignore-no-store" makes everything which is forbidden to be cached go into the storage. NOTE: no-store on a favicon is usually only done on private company internal sites where the entire domain or subdomain (its existence even) is legally privilaged information.

"ignore-private" makes Squid ignore the privacy restrictions on marked content and deliver the per-user content to all users. NOTE: private content *can* be cached by Squid. It is the ability to send one users private data to another user which is enabled by this option. Consider that the favicon is sometimes used for ever-cookie style tagging of users or signalling of persistent authentication states. You just caused any server doing that to send the wrong signals to the wrong users.

"override-lastmod" makes Squid ignore the Last-Modified timestamp when applying caching policy. NOTE: without a last modified timestamp the caching policy is fed the Date header on the transaction. Effectively everything is less than 1 second old.

"override-expires" makes Squid ignore the Expires: header on the response when applying caching policy.
  NOTE: without expiry timestamp the object *never* expires.


My question:
Is this the correct instruction? I think not, since I get "HIT" response headers even after one hour of caching.

Are HITs somehow bad? note that HIT is not related to FRESH/STALE in HTTP/1.1. It just means the cached object is *able* to be sent to the client immediately.

You can set debug_options 22,3 to get a trace of the refresh algorithm tests and reasons about a response FRESH/STALE.

Amos





[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux