varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
185 stars 86 forks source link

Purge multiple keys, AND / OR #215

Open jasonbahl opened 1 year ago

jasonbahl commented 1 year ago

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?

gquintard commented 1 year ago

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.