<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 05/03/2012 03:20, Quintin Par wrote:
<blockquote
cite="mid:CACW9FdN9RC79qt1bJ580S1FBEsvMiypTdV202qDfe==ooLThXQ@mail.gmail.com"
type="cite">So in the same location directive, <b>how can I apply
an
additional caching strategy with SSI on</b>(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
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div class="gmail_quote">
<p>
proxy_cache_bypass $cookie_sessionid;</p>
<p>to refresh cache entries. </p>
<p>I believe this is scenario for a lot of websites out
there. <br>
</p>
</div>
</blockquote>
</div>
</blockquote>
<br>
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.<br>
<br>
Can you <br>
a) Make the URLs different for logged in and non logged in users?
Then the problem goes away. eg user sees site at
<a class="moz-txt-link-freetext" href="http://profile/myname">http://profile/myname</a> or whatever<br>
<br>
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 <br>
<br>
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?<br>
<br>
Good luck<br>
<br>
Ed W<br>
<br>
</body>
</html>