varnish/varnish-modules

Purge multiple keys, AND / OR

Opened this issue · 1 comments

question / feature request:

I would like to be able to pass an array of keys to purge and only purge documents that have all of the keys

for example, if I call purge( 'a, b, c' ), this will purge documents tagged with a, OR, b, OR c.

Is it possible to only purge documents tagged with a AND b AND c?

this should be possible, but would be a bit hacky. We could add an extra check to make sure an object has all the tags. It's not pretty and would lead to some extra work but that's probably easier than overhaul the whole storage struct.

the vmod is technically in maintenance, but if you find a good soul to open a PR, I'll happily look at it.