Closed redbox-cdn closed 8 years ago
Hi
xkey only lets you purge content based on the specific key that was associated when the object was inserted into cache.
If test1.com/foo
and test2.com/foo
both have the key /foo
, they will necessarily both be purged if you issue a purge on that key.
The solution here is to make your keys more specific and include the host header as well. So for your example, test1.com/foo
sets xkey: test1.com/foo
and likewise for test2.com/foo
which would set xkey: test2.com/foo
. This will then permit you to invalidate each of them separately via invoking xkey.purge()
with the correct host and URL.
Hi @daghf @redbox-cdn ,
I'm trying to test purge using VCL implemented Xkey headers. Could you please share the example VCL config ? I can set req.http.key in VCL file.
Hi
Is there way to control the xkey purge action ?
I would like to purge object only include domainname.com AND req.http.xkey. if not include domainname, action is skipped.
Background: in case of multi host, the other hostname or sites content has purged when xkey header is same value.
EX: test1.com test.txt xkey header = keyherder
test2.com test.txt xkey header = keyherder
So I considered following code using BAN but I do not know how to use the xkey module.
In case of BAN
In case of xkey Purge