On 04/01/2012 03:21 AM, Amos Jeffries wrote:
Other useful things to know;
Generating an ETag label for each unique output helps caches detect
unique versions without timestamp calculations. The easy ways to do this
are to make ETag a MD5 hash of the body object. Or a hash of the
Last-Modified timestamp string if the body is too expensive to locate
MD5 for. Or some other property of the resource which is guaranteed to
change any time the body changes and not otherwise.
As I told you this was my successive step.
I implemented ETag, working perfectly fine now by computing the MD5 of
the content before formatting it
it's the MD5 of the actual Data that I use to obtain the response (which
can be Json, XML, Html, ...).
But I have issues with Squid not sending me the ETag in If-None-Modified
request header, I created another topic here in the list:
"Squid 3.1 + Accel conf + ETag = ignoring ETag"
to discuss this.
Cache-Control:stale-while-revalidate tells caches to revalidate, but not
to block the client response waiting for that validation to finish.
Clients will get the old object until a new one or 304 is received back.
I can't use this yet because I have an older version of Squid but thank
you, I'll use it as soon as my production Linux distribution update Squid.
bye