purge cache for stripped .html files

This commit is contained in:
Kyle Drake 2022-12-15 10:21:55 -06:00
parent 1d448f8cac
commit 9bb34424ff
2 changed files with 14 additions and 0 deletions

View file

@ -14,6 +14,12 @@ class PurgeCacheWorker
# Must always have a forward slash
path = '/' + path if path[0] != '/'
# Add removed html ext if present
html = path.match(/(.*)\.html?$/)
if html
PurgeCacheWorker.perform_async username, html.captures.first
end
$redis_proxy.publish 'proxy', {cmd: 'purge', path: "#{username}#{path}"}.to_msgpack
=begin
url = Addressable::URI.encode_component(