sqlish queries for cache invalidation?

Alexandros Kechagias alexandros.kechagias at gmail.com
Mon Jan 29 10:29:51 UTC 2018


> So if you need complex expressions and are ready to give up the
> real-time nature of xkey purges, you can reuse whatever headers (xkey
> supports a couple) that contain your invalidation keys and issue bans
> instead:
>
>     ban obj.http.xkey ~ project2 && obj.http.xkey ~ inst6

That's what i am going to do.

>    * ``==``: *<field>* and *<arg>* are equal strings (case sensitive)
>    * ``!=``: *<field>* and *<arg>* are unequal strings (case sensitive)
>    * ``~``: *<field>* matches the regular expression *<arg>*
>    * ``!~``:*<field>* does not match the regular expression *<arg>*
>
>should suffice to implement arbitrary logic based on
>
>    * ``req.url``: The request url
>    * ``req.http.*``: Any request header
>    * ``obj.status``: The cache object status
>    * ``obj.http.*``: Any cache object header

Ok, now i get that too.

I think I have to improve my understanding of varnish.
I didn't knew that I can access the all the data that xkey uses to tag the
caches.

Thanks a bunch for your time guys, this really helped.
Alexandros
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20180129/372bf345/attachment.html>


More information about the varnish-misc mailing list