Welcome! Log In Create A New Profile

Advanced

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

Ed W
March 06, 2012 11:48AM
On 05/03/2012 03:20, Quintin Par wrote:
> 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.
>

In theory GET is designed to be idempotent, therefore whilst it's
desirable to customise pages per user, you quickly get tied in knots, as
here.

Can you
a) Make the URLs different for logged in and non logged in users? Then
the problem goes away. eg user sees site at http://profile/myname or
whatever

b) Use client side features to customise the page, ie write the username
to a cookie (sounds like it's done already). Then use client side
javascript to customise the page for each request. In this way each
page is absolutely identical, any modifications are done client side.
Frequently it can be designed to fail gracefully in the case of disabled
javascript, etc

I think that whilst this has some compromises, if you can accept those
then you end up with a MUCH simpler application and simpler caching?

Good luck

Ed W

_______________________________________________
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: 277
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready