about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-16 02:36:38 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-16 02:36:38 -0600
commita9da3ce93b8c5236bfca0f99cc88b5aba86ab186 (patch)
tree58bc988bdab5ef29c7399439246ba1e8b53246d0 /app/workers
parent1274ec3a611939050c0512e504fcbe0a21c34144 (diff)
invalidate cache when publishing previously-unpublished posts
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/post_status_worker.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/post_status_worker.rb b/app/workers/post_status_worker.rb
index 674491bb7..e41c80167 100644
--- a/app/workers/post_status_worker.rb
+++ b/app/workers/post_status_worker.rb
@@ -23,6 +23,8 @@ class PostStatusWorker
 
     PollExpirationNotifyWorker.perform_at(status.poll.expires_at, status.poll.id) if status.poll
 
+    Rails.cache.delete("statuses/#{status.id}")
+
     return true if !status.reply? || status.account.id == status.in_reply_to_account_id || status.hidden
     ActivityTracker.increment('activity:interactions')
     return if status.account.following?(status.in_reply_to_account_id)