mirror of
https://github.com/neocities/neocities.git
synced 2025-08-02 15:51:55 +02:00
Flush cache on surf pages
This commit is contained in:
parent
e4c88688e7
commit
351816c154
2 changed files with 10 additions and 2 deletions
|
@ -591,7 +591,11 @@ class Site < Sequel::Model
|
|||
# We gotta flush the dirname too if it's an index file.
|
||||
if relative_path != '' && relative_path.match(/\/$|index\.html?$/i)
|
||||
PurgeCacheOrderWorker.perform_async username, relative_path
|
||||
PurgeCacheOrderWorker.perform_async username, Pathname(relative_path).dirname.to_s
|
||||
|
||||
purge_file_path = Pathname(relative_path).dirname.to_s
|
||||
|
||||
PurgeCacheOrderWorker.perform_async username, '/?surf=1' if purge_file_path == '/'
|
||||
PurgeCacheOrderWorker.perform_async username, purge_file_path
|
||||
else
|
||||
PurgeCacheOrderWorker.perform_async username, relative_path
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue