cache_buster_worker.rb 306 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. class CacheBusterWorker
  3. include Sidekiq::Worker
  4. include RoutingHelper
  5. sidekiq_options queue: 'pull'
  6. def perform(path)
  7. cache_buster.bust(full_asset_url(path))
  8. end
  9. private
  10. def cache_buster
  11. CacheBuster.new(Rails.configuration.x.cache_buster)
  12. end
  13. end