I&#39;ve not used the memcache module, but in general, what you are asking should be possible using the following:<br><br>  location / {<br>    set $logged_in &quot;no&quot;;<br>    if ($http_cookie ~* &quot;logged_in=yes&quot;) {<br>
      set $logged_in &quot;yes&quot;;<br>    }<br>    if ($logged_in = &quot;yes&quot;) {<br>      proxy_pass  <a href="http://app_server">http://app_server</a>;<br>      break;<br>    }<br>    # otherwise, serve a cached page here<br>
  }<br><br>I have tested something similar to this, but not this exact config.  Also, note that this would be easy to spoof.  (My $logged_in variable and the cookie that sets it are used only to decide whether to serve a cached page -- not to determine whether a user is actually logged in.)<br>
<br>Also note that my cookie check is simplified for the purpose of simplicity.  If you need to read a cookie, see the example in the &quot;if&quot; documentation here: <a href="http://wiki.codemongers.com/NginxHttpRewriteModule#if">http://wiki.codemongers.com/NginxHttpRewriteModule#if</a><br>
<br><div class="gmail_quote">On Thu, Feb 26, 2009 at 5:27 PM, Neil Sheth <span dir="ltr">&lt;<a href="mailto:nsheth@gmail.com">nsheth@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I&#39;m looking at enabling the memcache module.  One question - for any<br>
member who has logged in to my site, I don&#39;t want to serve a cached<br>
copy of the page.  It&#39;s fine for anonymous users, however.  Is this<br>
possible?  If I store a login cookie on the client, would that work?<br>
<br>
Thanks!<br>
<br>
</blockquote></div><br>