<div class="gmail_quote"><p>Hi all,</p>
<p>I currently have a good caching solution for non-logged
in users as shown below </p>
<p class="MsoNormal">location / {</p>
<p class="MsoNormal"> proxy_pass <a href="http://localhost:82" target="_blank">http://localhost:82</a>;</p>
<p class="MsoNormal"> proxy_set_header Host $host;</p>
<p class="MsoNormal">
proxy_set_header X-Real-IP $remote_addr;</p>
<p class="MsoNormal">
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for;</p>
<p class="MsoNormal"> proxy_set_header
Accept-Encoding "";</p>
<p class="MsoNormal"> proxy_ignore_headers
Set-Cookie; </p>
<p class="MsoNormal"> proxy_ignore_headers
Cache-Control; </p>
<p class="MsoNormal"> proxy_ignore_headers
Expires; </p>
<p class="MsoNormal"> proxy_ignore_headers
X-Accel-Expires; </p>
<p class="MsoNormal"> proxy_no_cache
$cookie_sessionid;</p>
<p class="MsoNormal"> proxy_cache_bypass
$cookie_sessionid;</p>
<p class="MsoNormal"> proxy_cache cache;</p>
<p class="MsoNormal"> proxy_cache_key $scheme$host$request_uri; </p>
<p class="MsoNormal">
proxy_cache_valid 200 302
5m;</p>
<p class="MsoNormal"> proxy_cache_valid
404 1m;</p>
<p class="MsoNormal">
proxy_cache_use_stale updating;</p>
<p class="MsoNormal">}</p>
<p>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) </p>
<p>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 </p>
<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. </p>
<p>Can someone help please? </p><span class="HOEnZb"><font color="#888888">
<p>-Quintin</p>
</font></span></div><br>