What is Age header in varnish

Abhishek Singh abhishek.rhce at gmail.com
Fri Jan 23 12:03:30 CET 2009


Hi,

I have configured varnish for caching static content as well as my home page
that is index.php. my config is like this for caching index.php, i trying to
set cache time 1 week for index.php but i am confused how to make sure that
index.php is cached for one week while varnish is serving from cache that is
sure i checked varnish headers.




sub vcl_recv {

if(req.request == "GET" && req.http.cookie && req.http.host ~ "^
www.example.com$" && req.url ~ "^/index\.(php)") {
        remove req.http.Set-Cookie;
        lookup;
  }
}

sub vcl_fetch {
if (req.request == "GET" && req.http.host ~ "^www.example.com$" && req.url ~
"^/index\.(php)") {

        unset obj.http.set-cookie;
        set obj.ttl = 1w;
      }
}


Can anyone please explain that why Age header is changing on every refresh
while i set "set obj.ttl" for 1 week and is the use of Age header. Is there
anything that i have to modify in my varnish config file to cache index.php.
please suggest something.

X-Varnish

473060033 473059746

Age

8713

Via

1.1 varnish


X-Varnish

473060081 473059746

Age

10141

Via

1.1 varnish



-- 
Abhishek Kumar Singh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20090123/327ff3b0/attachment-0002.html>


More information about the varnish-misc mailing list