<div dir="ltr"><div class="gmail_extra">Hi there,</div><div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">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.<br><br>For Example:</div><div class="gmail_extra">1. User wants the pages called :</div><div class="gmail_extra">- mysite.mars/foo</div><div class="gmail_extra">- mysite.mars/bar</div><div class="gmail_extra">- mysite.mars/baz<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">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</div><div class="gmail_extra">Let's say beresp.http.xkey gives me back the following keys/tags for each site (I will visualize them with brackets)<br></div><div class="gmail_extra"><div class="gmail_extra">- mysite.mars/foo [project1] [inst6]</div><div class="gmail_extra">- mysite.mars/bar [project2] [inst6]<br></div><div class="gmail_extra"><div class="gmail_extra">- mysite.mars/baz [project2] [inst6]<br></div><div class="gmail_extra"></div></div><div class="gmail_extra"><div class="gmail_extra"><br></div></div><div class="gmail_extra">3. Now I know that the purpose of xkey is that i can say:</div><div class="gmail_extra">xkey.purge("inst6")</div><div class="gmail_extra">That would delete all the caches.</div><div class="gmail_extra">xkey.purge("project2")<br></div><div class="gmail_extra">Would delete the last two.</div><div class="gmail_extra"><br></div><div class="gmail_extra">But I have a different problem.</div><div class="gmail_extra">I want to be able to delete "inst6" only from "project2".</div><div class="gmail_extra">So something like:</div><div class="gmail_extra"><br></div><div class="gmail_extra">xkey.purge("project2" && "inst6")</div><div class="gmail_extra"><br></div><div class="gmail_extra">would be nice.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Has someone an idea how I can solve this problem with already existing varnish modules or with a VCL algorithm of a reasonable complexity?</div><div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Alexandros<br></div></div></div>