From e4a214a0c4e1295aad65cd5e69eae2e0b757fc4e Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Wed, 3 Feb 2021 13:13:29 -0500 Subject: [PATCH] Revert "deleted unneccessary looping queries in EntityCache" This reverts commit d20330f39133bcc4571ffdc1c518a3dcba93baff. --- app/lib/entity_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/entity_cache.rb b/app/lib/entity_cache.rb index 57a3ea59..19297fb1 100644 --- a/app/lib/entity_cache.rb +++ b/app/lib/entity_cache.rb @@ -8,7 +8,7 @@ class EntityCache MAX_EXPIRATION = 7.days.freeze def mention(username, domain) - Rails.cache.fetch(to_key(:mention, username, domain), expires_in: MAX_EXPIRATION) { Account.select(:username, :domain, :url) } + Rails.cache.fetch(to_key(:mention, username, domain), expires_in: MAX_EXPIRATION) { Account.select(:username, :domain, :url).find_local(username) } end def emoji(shortcodes, domain = nil)