[Varnish] #857: ESI includes don't account for manually timed out files
Varnish
varnish-bugs at varnish-cache.org
Wed Feb 2 20:05:24 CET 2011
#857: ESI includes don't account for manually timed out files
------------------------+---------------------------------------------------
Reporter: dhelkowski | Type: defect
Status: new | Priority: normal
Milestone: | Component: build
Version: 2.1.4 | Severity: normal
Keywords: |
------------------------+---------------------------------------------------
I have ESI setup in varnish. I have a file 'a.ehtml' that includes
'b.html' via an ESI include. I have my hit function setup to do 'set
obj.ttl=0s' when a 'no-cache' request is sent in.
If I make a request to b.html to reset it via 'no-cache', 'a.ehtml' still
continues to be cached for the original ttl of 'b.html' before I set it to
0.
The relevant portion of vcl_hit:
if( req.http.Cache-Control == "no-cache" ) {
if (! (req.http.User-Agent ~ "bot|MSIE") ) {
set obj.ttl = 0s;
return(restart);
}
}
The revelant portion of vcl_fetch:
if( req.url ~ "\.ehtml$" || beresp.http.Content-Type == "text/ehtml" ) {
set beresp.http.Content-Type = "text/html";
esi;
}
--
Ticket URL: <http://www.varnish-cache.org/trac/ticket/857>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list