checking for Pragma = no-cache for logins

Kevin K k at kevinkevin.com
Fri Aug 5 16:32:49 CEST 2011


Hello,

I have a joomla system behind varnish 2.1 caching server. I am trying to
establish VCL rules that pass (or pipe) traffic if certain login conditions
are met. Joomla has an expired headers plugin that can set the "Pragma =
no-cache" request http header if the user is trying to login.

My corresponding vcl_recv rule looks like the following :

if (req.http.Pragma ~ "no-cache"){
set req.backend = iamloggedin;
return(pass);
}

Whats happening when I try to login is I believe the login session gets
created, but the page doesnt get updated. When I look at the headers for the
index.php after you click "login" , I see a response from varnish "304 not
modified" ,and it just shows me a cached version of the page.

Do I need to set corresponding "Pragma" rules in vcl_deliver or vcl_fetch ?
Why would this happen if i explicitly tell varnish to pass or pipe the
traffic if "no-cache" is present?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110805/0ab57af9/attachment-0003.html>


More information about the varnish-misc mailing list