<p class="MsoNoSpacing">Hi,</p>
<p class="MsoNoSpacing">Can someone help? I don’t want to end up using if case. </p>
- Quintin<div><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 8:47 AM, Quintin Par <span dir="ltr"><<a href="mailto:quintinpar@gmail.com" target="_blank">quintinpar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>
</p><p>Hi all, </p>
<p>How can I set separate caching expiration time for authenticated
and non auth users? </p>
<p>In my case the caching is set this way</p>
<p class="MsoNormal"><span style="font-size:10.0pt">proxy_cache_key $scheme$host$request_uri$cookie_sessionid;
</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">proxy_cache_valid 200 302 2m;</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">proxy_cache_use_stale updating;</span></p>
<p>The presence of session ID ensure separate cache pages
for auth & non auth users. </p>
<p>But I want an experience where non auth users have a page
cached for 1 hour and auth users have a page cached for 2 mins. </p>
<p>How can I achieve this in Nginx? Can someone help? </p>
<p>FYI, this is under the same location directive.</p><span class="HOEnZb"><font color="#888888"><p>- Quintin </p><p></p>
<p></p>
</font></span></blockquote></div><br></div>