Old thread: Cache for non-cookie users and fresh for cookie users
quintinpar at gmail.com
Thu Feb 9 07:04:33 UTC 2012
Picking up an old thread for caching
Igor talks about caching by
“No, currently the single way is:
1) add the cookie in proxy_cache_key
proxy_cache_key "http://cacheserver$request_uri $cookie_name";
2) add "X-Accel-Expires: 0" in response with the cookie.”
But from my understanding of “*X-Accel-Expires” *it expires the cache in
the cache repository as given below
“Sets when to expire the file in the internal Nginx cache, if one is used.”
Does this not mean that when I set cookie and pass “X-Accel-Expires: 0” it
expires the cache for the non logged in user too, for that cache key? A new
cache entry will then have to be created, right?
Should I go with “Cache-Control: max-age=0” approach?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx