Object no cached when TTL expires
Roberto O. Fernández Crisial
roberto.fernandezcrisial at gmail.com
Tue Jan 11 21:10:31 CET 2011
I've unset beresp.http.Etag but still doesn't work. After TTL expires, the
Age header shows "0":
Via 1.1 varnish, 1.1 V107WPROD
Connection Keep-Alive
Proxy-Connection Keep-Alive
Content-Length 2678
Age 3
Date Tue, 11 Jan 2011 18:06:04 GMT
Content-Type image/jpeg
Server Apache/2.2.15 (Unix) mod_fcgid/2.3.5
Last-Modified Tue, 11 Jan 2011 17:51:29 GMT
X-Cacheable 1800.002
X-Varnish 1806792167 1806789988
X-Varnish-Cache HIT Varnish (12)
Via 1.1 varnish, 1.1 V107WPROD
Connection Keep-Alive
Proxy-Connection Keep-Alive
Content-Length 2678
Age 525
Date Tue, 11 Jan 2011 18:14:46 GMT
Content-Type image/jpeg
Server Apache/2.2.15 (Unix) mod_fcgid/2.3.5
Last-Modified Tue, 11 Jan 2011 17:51:29 GMT
X-Cacheable 1800.002
X-Varnish 1808417729 1806789988
X-Varnish-Cache HIT Varnish (5528)
Via 1.1 varnish, 1.1 V107WPROD
Connection Keep-Alive
Proxy-Connection Keep-Alive
Content-Length 2678
Age 1462
Date Tue, 11 Jan 2011 18:30:23 GMT
Content-Type image/jpeg
Server Apache/2.2.15 (Unix) mod_fcgid/2.3.5
Last-Modified Tue, 11 Jan 2011 17:51:29 GMT
X-Cacheable 1800.002
X-Varnish 1811285962 1806789988
X-Varnish-Cache HIT Varnish (15342)
alter TTL 1800s:
Via 1.1 varnish, 1.1 V107WPROD
Connection Keep-Alive
Proxy-Connection Keep-Alive
Content-Length 2678
Age 0
Date Tue, 11 Jan 2011 19:22:07 GMT
Content-Type image/jpeg
Server Apache/2.2.15 (Unix) mod_fcgid/2.3.5
Last-Modified Tue, 11 Jan 2011 19:10:04 GMT
X-Cacheable 1800.007
X-Varnish 1821237358
X-Varnish-Cache MISS Varnish
Any ideas?
Thank you!
Roberto.
2011/1/11 pablort <pablort+varnish at gmail.com <pablort%2Bvarnish at gmail.com>>
> Notice how Etag changes:
>
>
> First and second request:
> Etag "a76-49992a41d1b5d"
>
> Last request:
> Etag "a76-499933333a882"
>
>
> Try (in vcl_fetch):
>
> unset beresp.http.Etag;
>
> or change Apache to use only Size and MTime to create the Etag:
>
> FileETag MTime Size
> Cheers,
>
> 2011/1/11 Roberto O. Fernández Crisial <roberto.fernandezcrisial at gmail.com
> >
>
>> Hi guys,
>>
>> I have a question about varnish vcl, can you help me? Once the varnish
>> service is started the object (in this case an image) is cached:
>>
>> Via 1.1 varnish, 1.1 V107WPROD
>> Connection Keep-Alive
>> Proxy-Connection Keep-Alive
>> Content-Length 2678
>> Age 4
>> Date Tue, 11 Jan 2011 14:20:01 GMT
>> Content-Type image/jpeg
>> Etag "a76-49992a41d1b5d"
>> Server Apache/2.2.15 (Unix) mod_fcgid/2.3.5
>> Last-Modified Tue, 11 Jan 2011 14:10:04 GMT
>> X-Cacheable 1800.004
>> X-Varnish 826882404 826879249
>> X-Varnish-Cache HIT Varnish (9)
>>
>>
>> After some minutes later:
>>
>> Via 1.1 varnish, 1.1 V107WPROD
>> Connection Keep-Alive
>> Proxy-Connection Keep-Alive
>> Content-Length 2678
>> Age 1299
>> Date Tue, 11 Jan 2011 14:41:36 GMT
>> Content-Type image/jpeg
>> Etag "a76-49992a41d1b5d"
>> Server Apache/2.2.15 (Unix) mod_fcgid/2.3.5
>> Last-Modified Tue, 11 Jan 2011 14:10:04 GMT
>> X-Cacheable 1800.004
>> X-Varnish 832397538 826879249
>> X-Varnish-Cache HIT Varnish (21056)
>>
>>
>> When TTL expires (1800s) the object is no longer been cached:
>>
>> Via 1.1 varnish, 1.1 V107WPROD
>> Connection Keep-Alive
>> Proxy-Connection Keep-Alive
>> Content-Length 2678
>> Age 0
>> Date Tue, 11 Jan 2011 14:58:03 GMT
>> Content-Type image/jpeg
>> Etag "a76-499933333a882"
>> Server Apache/2.2.15 (Unix) mod_fcgid/2.3.5
>> Last-Modified Tue, 11 Jan 2011 14:50:05 GMT
>> X-Cacheable 1800.002
>> X-Varnish 836621253
>> X-Varnish-Cache MISS Varnish
>>
>>
>> Unless the service is restarted. Do you have any idea what could be
>> happen? Do you see something abnormal in headers? My Varnish version is
>> "varnishd (varnish-2.1.3 SVN )".
>>
>> Thank you very much,
>> Roberto.
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110111/9791bfa2/attachment-0003.html>
More information about the varnish-misc
mailing list