Remove Articles/BustMultipleCachesJob (#5388)
This is a follow up from #5309. This commit removes the Articles/BustMultipleCachesJob after we migrated it to Sidekiq.
This commit is contained in:
parent
44403eba89
commit
4d7d3edb2d
2 changed files with 0 additions and 31 deletions
|
|
@ -1,12 +0,0 @@
|
|||
module Articles
|
||||
class BustMultipleCachesJob < ApplicationJob
|
||||
queue_as :articles_bust_multiple_caches
|
||||
|
||||
def perform(article_ids, cache_buster = CacheBuster)
|
||||
Article.select(:id, :path).where(id: article_ids).find_each do |article|
|
||||
cache_buster.bust(article.path)
|
||||
cache_buster.bust("#{article.path}?i=i")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
require "rails_helper"
|
||||
|
||||
RSpec.describe Articles::BustMultipleCachesJob, type: :job do
|
||||
include_examples "#enqueues_job", "articles_bust_multiple_caches", [1, 2]
|
||||
|
||||
describe "#perform_now" do
|
||||
it "busts cache" do
|
||||
article = create(:article)
|
||||
path = article.path
|
||||
|
||||
cache_buster = double
|
||||
allow(cache_buster).to receive(:bust)
|
||||
|
||||
described_class.perform_now([article.id], cache_buster)
|
||||
expect(cache_buster).to have_received(:bust).with(path).once
|
||||
expect(cache_buster).to have_received(:bust).with(path + "?i=i").once
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue