Help: cache or not by cookie

Igor Sysoev is at
Fri Sep 4 13:37:20 MSD 2009

On Thu, Sep 03, 2009 at 06:53:41PM -0400, ned0r wrote:

> If you use the proxy_cache_key directive as you demonstrated above (i.e. proxy_cache_key "http://cacheserver$request_uri$cookie_user";) then my understanding is:
> If a user doesn't have that cookie set, the page will be cached, and all users who don't have the cookie set will see the same page.
> If a user does have that cookie set, then the page will also be cached, but it will only be served to people who have identical values for that cookie (in my case this means users with that session key).
> Is this correct?


> The problem is that that isn't how it appears to be working at the moment. I've put the $cookie_sessionkey variable in my proxy_cache_key and I'm basically seeing the "logged in page" for both browsers with and without the cookie set :-(
> I'm using nginx 0.7.61 (from Debian Sid)

Could you create denug log ?

Igor Sysoev

More information about the nginx mailing list