Fix followers hash cache not being invalidated on account merge (#15256)

Also clear relationships cache.
This commit is contained in:
ThibG 2020-12-02 21:20:00 +01:00 committed by GitHub
parent fbff89be03
commit 9136be480f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,5 +39,10 @@ module AccountMerging
end end
end end
end end
# Some follow relationships have moved, so the cache is stale
Rails.cache.delete_matched("followers_hash:#{id}:*")
Rails.cache.delete_matched("relationships:#{id}:*")
Rails.cache.delete_matched("relationships:*:#{id}")
end end
end end