Varnish 4 - respecting Cache-Control Headers from backend

topper87 at topper87 at
Mon Jul 6 21:35:54 CEST 2015

Hi all,

our backend sends response headers like s-maxage.
I need to tell Varnish to cache the object with the same value as the backends sends the object.

So Varnish should accept the s-maxage from backend and cache this object without redefining the http.cache.control because the value of s-maxage could change from site to site.

I do not know the site urls so i would do it in vcl_backend_response

if (beresp.http.Cache-Control ~ "no-cache") {
//set s-maxage from backend

I'd appreciate any help and support


More information about the varnish-misc mailing list