title: Varnish 3 caching logged in pages as well
body: <p>I'm scratching my head for 2 days with no luck. I've configured Varnish 3 with Pressflow 6 (Drupal) and everything is good i.e. Varnish is caching the pages. Now the pain is Varnish is caching even after login. So when i do logout i still see your are logged in messages etc.</p>
  
  <p>I tried to set a unique cookie upon Login in modules/user/user.module file and modified the /etc/varnish/default.vcl file adding the following block.</p>
  
  <pre><code>if (req.http.Cookie ~ "(MY_UNIQUE_COOKIE)") {
    return (pass);
  }
  </code></pre>
  
  <p>Everything works as expected now but in logout script, i am not able to completely delete the cookie via PHP i.e. setting the time in minus. I believe the actual cookie goes away after the browser is closed/restarted. </p>
  
  <p>So now onwards, if i don't close the browser, the cookie is there and Varnish always send every page to Apache Backend.</p>
  
  <p>Any help would be highly appreciated.</p>
  
  <p>Regards,</p>
  
  <p>Raheel</p>