updating a file

Bjørn Ruberg bjorn at ruberg.no
Thu Jan 24 14:41:30 CET 2013


On 01/24/2013 02:33 PM, Friedrich Locke wrote:
> Hi folks,
>
> I am running varnish now. A doubt arose: how does varnish handle the scenario:
>
> You update the content of a image file but not the url of it. If
> varnished has cached that image before how does it know that image has
> been updated ?
> How much time does it take to varnish realize that image has been changed ?

Cache expiration is related to the objects' TTL defined in the VCL, i.e. 
what *you* decide. The default TTL is 120 seconds. Varnish does not 
check for updated backend resources all by itself.

If the TTL has expired, the next request for it will update the cached 
object in Varnish.

If the TTL has not expired, Varnish will not know about it and you will 
need to make Varnish aware of it. This is often managed by using some 
kind of PURGE mechanism.

-- 
Bjørn




More information about the varnish-misc mailing list