docbrown/app/workers/pages/bust_cache_worker.rb
Edward Tam cb98b3b510 pages bust cache job sidekiq refactor (#5338) [deploy]
* Refactored Pages::BustCacheJob to Pages::BustCacheWorker
* Removed Pages::BustCacheJob and specs
Co-authored-by: Edward Tam <edward6882990@gmail.com>
2020-01-02 15:16:09 -05:00

13 lines
266 B
Ruby

module Pages
class BustCacheWorker
include Sidekiq::Worker
sidekiq_options queue: :high_priority, retry: 10
def perform(slug, cache_buster = "CacheBuster")
return if slug.blank?
cache_buster.constantize.bust_page(slug)
end
end
end