Reverse Proxy Cache Setup
royo
nginx-forum at nginx.us
Mon Mar 29 20:44:51 MSD 2010
Ryan Malayter Wrote:
-------------------------------------------------------
> On Mon, Mar 29, 2010 at 8:41 AM, royo wrote:
> > I'm trying to use nginx as a reverse cahce for
> my website which may require people to be logged
> in. I'm trying to figure out how to configure it
> so that users that don't have a certain cookie set
> receive cached pages while others will receive
> non-cached responses, assuming the cookie is
> "logmein".
>
> Use $http_cookie_$logmein appended to whatever
> you're using for
> proxy_cache_key, so that you get a unique cache
> key for each user.
> This assumes that $logmein has a different value
> for every logged-in
> user (i.e. it is a session ID).
>
> You can also have the back-end explicitly set
> "Cache-Control:
> no-cache" for logged in pages, so they don't get
> stored by nginx at
> all.
>
> --
> RPM
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
Thanks Ryan. I don't have much control over the application itself, so I guess I'd need to enforce the caching somehow for users that are logged in and disable it for those that aren't from nginx.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,69049,69127#msg-69127
More information about the nginx
mailing list