Purging on PUT and DELETE
dridi at varni.sh
Thu Mar 19 10:33:42 UTC 2020
On Thu, Mar 19, 2020 at 10:28 AM Martynas Jusevičius
<martynas at atomgraph.com> wrote:
> Thank you Dridi.
> But what I'm reading here
> > Unlike purges, banned content won’t immediately be evicted from cache freeing up memory, instead it will either stay in cache until its TTL expires, if we ban on req properties, or it will be evicted by a background thread, called ban_lurker, if we ban on the obj properties
> Which means that using your example, if immediately follow up
> PUT/DELETE with a GET, it is not certain to get a fresh copy? Because
> "banned content won’t immediately be evicted from cache"?
That's because bans using req criteria (as opposed to obj) need a
request to happen to test the ban on a given object. And even bans
with obj criteria don't happen immediately, they eventually happen in
But once a ban is in the list, an object is not served from cache
before confirming that it isn't invalidated by a newer ban during
lookup, so you shouldn't worry about that.
More information about the varnish-misc