Welcome! Log In Create A New Profile

Advanced

Multiple caching solutions for anonymous and logged in users with SSI on

Quintin Par
March 04, 2012 10:28AM
Hi all,

I currently have a good caching solution for non-logged in users as shown
below

location / {

proxy_pass http://localhost:82;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Accept-Encoding "";

proxy_ignore_headers Set-Cookie;

proxy_ignore_headers Cache-Control;

proxy_ignore_headers Expires;

proxy_ignore_headers X-Accel-Expires;

proxy_no_cache $cookie_sessionid;

proxy_cache_bypass $cookie_sessionid;

proxy_cache cache;

proxy_cache_key $scheme$host$request_uri;

proxy_cache_valid 200 302 5m;

proxy_cache_valid 404 1m;

proxy_cache_use_stale updating;

}

But this is proving to be a lot of load when accessed by logged-in
users(with cookie). Typically situations like homepage (collection of a lot
of snippets)

So in the same location directive, *how can I apply an additional caching
strategy with SSI on*(users name details which needs to be pulled up every
time) for logged in users. Say cache pages for logged in users for a minute
with caching for non logged in users at 15 minutes. I also want

proxy_cache_bypass $cookie_sessionid;

to refresh cache entries.

I believe this is scenario for a lot of websites out there.

Can someone help please?

-Quintin
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Multiple caching solutions for anonymous and logged in users with SSI on

Quintin Par March 04, 2012 10:28AM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Quintin Par March 04, 2012 10:22PM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

António P. P. Almeida March 05, 2012 08:02PM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Quintin Par March 06, 2012 03:52AM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Antonio P.P. Almeida March 06, 2012 05:02AM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Quintin Par March 06, 2012 06:14AM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Antonio P.P. Almeida March 06, 2012 06:16AM

Re[2]: Multiple caching solutions for anonymous and logged in users withSSI on

Max March 06, 2012 12:56PM

Re[2]: Multiple caching solutions for anonymous and logged in users with SSI on

Max March 06, 2012 01:16PM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Ed W March 06, 2012 11:48AM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Antonio P.P. Almeida March 06, 2012 06:20AM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Quintin Par March 06, 2012 06:56AM

Re: Multiple caching solutions for anonymous and logged in users with SSI on

Antonio P.P. Almeida March 06, 2012 07:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 113
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready