Hi, <br><br>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.<br>
<br><br><br><br>sub vcl_recv {<br><br>if(req.request == "GET" && req.http.cookie && req.http.host ~ "^<a href="http://www.example.com">www.example.com</a>$" && req.url ~ "^/index\.(php)") {<br>
        remove req.http.Set-Cookie;<br>        lookup;<br>  }<br clear="all">}<br><br>sub vcl_fetch {<br>if (req.request == "GET" && req.http.host ~ "^<a href="http://www.example.com">www.example.com</a>$" && req.url ~ "^/index\.(php)") {<br>
<br>        unset obj.http.set-cookie;<br>        set obj.ttl = 1w;<br>      }<br>}<br><br><br>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.<br>
<br><table selected class="netInfoHeadersText netInfoText netInfoHeadersTable" width="281" cellpadding="0" cellspacing="0" height="87"><tbody class=""><tr class=""><td class="netInfoParamName">X-Varnish</td><td class="netInfoParamValue">
<pre class="">473060033 473059746</pre></td></tr><tr class=""><td class="netInfoParamName">Age</td><td class="netInfoParamValue"><pre class="">8713</pre></td></tr><tr class=""><td class="netInfoParamName">Via</td><td class="netInfoParamValue">
<pre class="">1.1 varnish</pre></td></tr></tbody></table><br><table selected class="netInfoHeadersText netInfoText netInfoHeadersTable" width="309" cellpadding="0" cellspacing="0" height="87"><tbody class=""><tr class="">
<td class="netInfoParamName">X-Varnish</td><td class="netInfoParamValue"><pre class="">473060081 473059746</pre></td></tr><tr class=""><td class="netInfoParamName">Age</td><td class="netInfoParamValue"><pre class="">10141</pre>
</td></tr><tr class=""><td class="netInfoParamName">Via</td><td class="netInfoParamValue"><pre class="">1.1 varnish</pre></td></tr></tbody></table><br><br>-- <br>Abhishek Kumar Singh<br><br>