I am trying to properly configure nginx to cache a site and appear to be having problems with the name of my cookie...
location ~ .php$ {
......
fastcgi_cache php;
fastcgi_cache_key $request_uri$http_cookie;
........
}
The above works but is unique for every single page visitor....
location ~ .php$ {
......
fastcgi_cache php;
fastcgi_cache_key $request_uri$cookie_CakeCookie[User][id];
........
}
CakeCookie[User][id] is the name of the cookie the script i am using sets.
When i do the above it seems to ignore the cookie component completely and servers everyone the same page...
Questions:
1) is the above the proper way to do key? $cookie_CakeCookie[User][id]
2) is this a bug in nginx not taking the [ ] in the cookie name?
3) is [ ] in the cookie name not standard?
Any help would be much appreciated.
Thanks!
Chris