Hi Guillaume, It works, finally!
Many thanks, Raphaël 2016-01-22 21:50 GMT+01:00 Guillaume Quintard < [email protected]>: > Hi Raphaël, > > Varnish ignores the must revalidate header, if you wish to emulate the > behaviour, you can use something like this in your vcl: > > sub vcl_backend_response { > if (beresp.http.cache-control ~ "must-revalidate") { > set beresp.ttl = 1s; > set beresp.grace = 0s; > set beresp.keep = 1w; > } > } > > This way, you'd only cache for 1 second (don't set it to 0, or all the > requests for this object would be done sequentially), but will keep the > object for a week, revalidating it each time it is requested and its ttl is > expired. > > -- > Guillaume Quintard > > On Fri, Jan 22, 2016 at 3:32 PM, Raphaël Malié <[email protected]> > wrote: > >> Hello, >> >> I did a fresh install of Varnish 4.1 to test conditional requests with a >> last-modified header sent from the backend, here are my backend headers: >> >> Cache-Control: must-revalidate, proxy-revalidate, public >> Last-Modified: Fri, 22 Jan 2016 14:27:50 GMT >> >> On the next query, Varnish should try to contact the backend with a >> if-modified-since header, and the backend shoud send back a "304 not >> modified" answer if nothing changed. >> >> But Varnish never tries to contact the backend, he is always caching my >> page with the default ttl (120s). >> >> Thank you for any help, >> Raphaël >> >> _______________________________________________ >> varnish-misc mailing list >> [email protected] >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >> > >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
