projects
/
pgweb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abebbae
)
Purge /dyncss/ when a css file is changed
author
Magnus Hagander
<magnus@hagander.net>
Thu, 14 Aug 2025 17:45:07 +0000
(19:45 +0200)
committer
Magnus Hagander
<magnus@hagander.net>
Thu, 14 Aug 2025 17:45:07 +0000
(19:45 +0200)
We serve combined CSS under that URL, so make sure it's purged along
with the static CSS.
tools/purgehook/purgehook.py
patch
|
blob
|
blame
|
history
diff --git
a/tools/purgehook/purgehook.py
b/tools/purgehook/purgehook.py
index 35e2127ed54774f57a885f2b11111d37869de231..73550dc18e32e9488bf02e95bc3b2fa41d798a84 100755
(executable)
--- a/
tools/purgehook/purgehook.py
+++ b/
tools/purgehook/purgehook.py
@@
-47,6
+47,10
@@
if __name__ == "__main__":
curs.execute("SELECT varnish_purge('^/' || %(u)s || '$')", {
'u': l.strip(),
})
+
+ # If it's a CSS file, we also need to purge /dyncss/
+ if l.endswith('.css'):
+ curs.execute("SELECT varnish_purge('^/dyncss/')")
elif l.startswith('data/'):
# Data files map to xkeys with the same name as the file prefixed by data_
curs.execute("SELECT varnish_purge_xkey(%(key)s)", {