On Tue, Mar 12, 2013 at 07:38:44PM +0800, Kelvin Loke wrote:
> I was wondering if it's possible to let Varnish to cache based on Backend
> server response header?
> For example, if Backend response header has "cache_ttl = 60", then Varnish
> will cache it for 60 seconds.

This is the default behaviour, except that the header is named Cache-Control:
max-age=NN.

> If the cache_ttl = 0 or is not exist in Backend, Varnish will not cache for
> that object at all.

If an object doesn't exist, the default behaviour is to cache the 404 for
120 seconds. If you want to change that, you can set beresp.ttl in vcl_fetch.


-- 
With regards,
Lasse Karstensen
Varnish Software AS

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to