Skip to content

Commit 499855d

Browse files
committed
Purge /dyncss/ when a css file is changed
We serve combined CSS under that URL, so make sure it's purged along with the static CSS.
1 parent abebbae commit 499855d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/purgehook/purgehook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
curs.execute("SELECT varnish_purge('^/' || %(u)s || '$')", {
4848
'u': l.strip(),
4949
})
50+
51+
# If it's a CSS file, we also need to purge /dyncss/
52+
if l.endswith('.css'):
53+
curs.execute("SELECT varnish_purge('^/dyncss/')")
5054
elif l.startswith('data/'):
5155
# Data files map to xkeys with the same name as the file prefixed by data_
5256
curs.execute("SELECT varnish_purge_xkey(%(key)s)", {

0 commit comments

Comments
 (0)