<p class="MsoNoSpacing">Thanks Antonio. </p>
<p class="MsoNoSpacing">On a side note, if I craft a proxy cache key with
cookie_sessionid and if the sessionid cookie does not exist, <b>will nginx take it as an
empty value</b>? </p>
<p class="MsoNoSpacing">Can nginx do a try_files or “if” on the existence of a
cookie? This will help me deliver two caching strategies in the same location directive. </p>
<p class="MsoNoSpacing">-Quintin</p><br><div class="gmail_quote">On Tue, Mar 6, 2012 at 6:29 AM, António P. P. Almeida <span dir="ltr"><<a href="mailto:appa@perusio.net">appa@perusio.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 5 Mar 2012 04h20 CET, <a href="mailto:quintinpar@gmail.com">quintinpar@gmail.com</a> wrote:<br>
<br>
> Hi all,<br>
><br>
</div><div class="im">> I guess many people didn't understand my question.<br>
><br>
> To make it simple, Can I have two caching strategies together:<br>
><br>
> one for logged in users and one for non-logged in users in the same<br>
> location directive?<br>
<br>
</div>I think that you need two locations for each batch of users. Define<br>
two locations and use map to test for the session cookie. If Present<br>
return a 418 and use error_page to redirect to the logged in users<br>
setup.<br>
<br>
You probably can do more "dynamic" things using the embedded Lua<br>
module [1].<br>
<br>
--- appa<br>
<br>
[1] <a href="http://wiki.nginx.org/HttpLuaModule" target="_blank">http://wiki.nginx.org/HttpLuaModule</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br>