Clear app cache during bin/setup (#16267)
This commit is contained in:
parent
9a76d32bcd
commit
38f7957e3a
2 changed files with 8 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ namespace :app_initializer do
|
|||
Rake::Task["data_updates:enqueue_data_update_worker"].execute
|
||||
|
||||
puts "\n== Bust Caches =="
|
||||
Rake::Task["cache:clear_app_cache"].execute unless Rails.env.production?
|
||||
Rake::Task["cache:enqueue_path_bust_workers"].execute
|
||||
|
||||
Settings::General.health_check_token ||= SecureRandom.hex(10)
|
||||
|
|
|
|||
|
|
@ -7,4 +7,11 @@ namespace :cache do
|
|||
BustCachePathWorker.set(queue: :high_priority).perform_in(n.seconds, "/onboarding")
|
||||
end
|
||||
end
|
||||
|
||||
desc "Clear application cache"
|
||||
task clear_app_cache: :environment do
|
||||
raise "Attempting to clear Rails cache in production" if Rails.env.production?
|
||||
|
||||
Rails.cache.clear
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue