0
0
Fork 0

Fix call to inefficient delete_matched cache method in domain blocks (#28374)

This commit is contained in:
Claire 2023-12-18 17:14:43 +01:00 committed by GitHub
parent f4b9c2ba40
commit 7d9b209fe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 96 additions and 50 deletions

View file

@ -10,7 +10,7 @@ module RelationshipCacheable
private
def remove_relationship_cache
Rails.cache.delete("relationship:#{account_id}:#{target_account_id}")
Rails.cache.delete("relationship:#{target_account_id}:#{account_id}")
Rails.cache.delete(['relationship', account_id, target_account_id])
Rails.cache.delete(['relationship', target_account_id, account_id])
end
end