From 2b138363a46c90de0069edaddf114c0bd1dc3d33 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 19 Jun 2019 21:39:20 +0200 Subject: Use xkey instead of regexp when purging threads and lists --- loader/lib/varnish.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'loader/lib/varnish.py') diff --git a/loader/lib/varnish.py b/loader/lib/varnish.py index 2b2bf89..4d346dd 100644 --- a/loader/lib/varnish.py +++ b/loader/lib/varnish.py @@ -19,11 +19,11 @@ class VarnishPurger(object): for p in purges: if isinstance(p, tuple): # Purging a list - exprlist.append('obj.http.x-pglm ~ :%s/%s/%s:' % p) + exprlist.append('pgam_%s/%s/%s' % p) else: # Purging individual thread - exprlist.append('obj.http.x-pgthread ~ :%s:' % p) - purgedict = dict(list(zip(['p%s' % n for n in range(0, len(exprlist))], exprlist))) + exprlist.append('pgat_%:' % p) + purgedict = dict(list(zip(['x%s' % n for n in range(0, len(exprlist))], exprlist))) purgedict['n'] = len(exprlist) r = requests.post(purgeurl, data=purgedict, headers={ 'Content-type': 'application/x-www-form-urlencoded', -- cgit v1.2.3