Bust caches at different intervals on restart (#11369)
This commit is contained in:
parent
a56f3630bf
commit
a7ac6a2c3a
1 changed files with 7 additions and 4 deletions
|
|
@ -2,9 +2,12 @@ namespace :cache do
|
|||
desc "Enqueue BustCachePathWorker"
|
||||
task enqueue_path_bust_workers: :environment do
|
||||
# Trigger cache purges for globally-cached endpoints that could have changed
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(10.minutes, "/shell_top")
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(10.minutes, "/shell_bottom")
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(10.minutes, "/onboarding")
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(10.minutes, "/async_info/shell_version")
|
||||
[30, 180, 600].each do |n|
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(n.seconds, "/")
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(n.seconds, "/shell_top")
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(n.seconds, "/shell_bottom")
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(n.seconds, "/onboarding")
|
||||
BustCachePathWorker.set(queue: :high_priority).perform_in(n.seconds, "/async_info/shell_version")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue