Does hash_always_miss invalidate the cache? - Quintin
On Wed, Jul 5, 2017 at 1:21 AM, Dridi Boukelmoune <[email protected]> wrote: > On Wed, Jul 5, 2017 at 10:04 AM, Quintin Par <[email protected]> wrote: > > > > Nginx has a nifty command for invalidating a specific cache > > > > proxy_cache_bypass $http_cachepurge; > > > > curl -I myapp.example.com/api/ping > <https://mailtrack.io/trace/link/034cd6cb88d2124e6aa40aa6bf29bd014db03eb8?url=http%3A%2F%2Fmyapp.example.com%2Fapi%2Fping&userId=74734&signature=64a0a6061bf36017> > -H "cachepurge: true" > > > > Is there something equivalent in varnish? > > Hi, > > I'm not familiar with this nginx feature, but there is a hash_always_miss > feature in Varnish that allows you to bypass a cache hit. > > You can probably do something like this in vcl_recv{}, I haven't tried: > > set req.hash_always_miss = req.http.cachepurge == "true"; > > However, this opens a DoS vector so you probably want to restrict this > using an ACL or other means. > > Dridi > > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > <https://mailtrack.io/trace/link/f72e9c877fe9a482b98f0606a6b12e974cf3ebef?url=https%3A%2F%2Fwww.varnish-cache.org%2Flists%2Fmailman%2Flistinfo%2Fvarnish-misc&userId=74734&signature=db96c78a1ed9472f> >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
