sqlish queries for cache invalidation?
alexandros.kechagias at gmail.com
Fri Jan 26 15:12:53 UTC 2018
thanks for the replies. I see, I didn't give you enough details for you to
be able to help me. Sorry for that, I had a little bit of tunnel vision and
also the title is not optimal.
The reason I am using xkey, is that I am tagging content that comes from
the Backend, with tags/names that I use afterwards to invalidate everything
that has to do with the tags/names. The problem is that in my scenario the
URLs can't always reliably reflect their content. So I decided to use tags,
so the backend can tell varnish how to group the content.
1. User wants the pages called :
2. Varnish asks the backend for the sites and tags them with xkey
accordingly to data that comes from the backend through beresp.http.xkey
Let's say beresp.http.xkey gives me back the following keys/tags for each
site (I will visualize them with brackets)
- mysite.mars/foo [project1] [inst6]
- mysite.mars/bar [project2] [inst6]
- mysite.mars/baz [project2] [inst6]
3. Now I know that the purpose of xkey is that i can say:
That would delete all the caches.
Would delete the last two.
But I have a different problem.
I want to be able to delete "inst6" only from "project2".
So something like:
xkey.purge("project2" && "inst6")
would be nice.
Has someone an idea how I can solve this problem with already existing
varnish modules or with a VCL algorithm of a reasonable complexity?
If I can't find anything I would have to write a module myself or maybe
look for some different caching technology. If you could also drop me a
hint there, that would also be nice.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the varnish-misc