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

Bird brain me :slight_smile:

What does this mean?

~SESS[[:alnum:]]+=(?<session_id>[[:graph:]]+) $session_id;

It means to grab the sub-token on the right-hand side of the session
token.
Using POSIX character classes for the regex:

Also ‘if’ is evil inside a location. Right ?

Not really. Here it’s a mere return. From the famous IfIsEvil wiki page:

 The only 100% safe things which may be done inside
 if in location context are:

       return ...;
       rewrite ... last;

–appa

Thanks a lot!
If I instruct nginx to cache a page and if it has ssi tags, will it
still
go to the back-end to retrieve?

Thanks a lot!
If I instruct nginx to cache a page and if it has ssi tags, will it still
go to the back-end to retrieve?

AFAIK yes. That shouldn’t introduce any issue. Nginx has support for SSI
also and you can implement a caching system taking advantage of it. But
it
requires you to split your page in multiple parts.

–appa