Skip to content

Commit

Permalink
Purge em all
Browse files Browse the repository at this point in the history
Moving over the change from forem#4744 into the migrated worker.
  • Loading branch information
VegaFromLyra committed Jan 16, 2020
1 parent 76a64b4 commit 77c824f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/workers/comments/bust_cache_worker.rb
Expand Up @@ -8,6 +8,7 @@ def perform(comment_id)
comment = Comment.find_by(id: comment_id)
return unless comment&.commentable

comment.purge
EdgeCache::Commentable::Bust.call(comment.commentable)
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/workers/comments/bust_cache_worker_spec.rb
Expand Up @@ -18,6 +18,7 @@
before do
allow(comment).to receive(:commentable).and_return(commentable)
allow(Comment).to receive(:find_by).with(id: comment_id).and_return(comment)
allow(comment).to receive(:purge)
end

it "calls the service" do
Expand Down

0 comments on commit 77c824f

Please sign in to comment.