From d20330f39133bcc4571ffdc1c518a3dcba93baff Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 3 Feb 2021 11:56:22 -0500 Subject: [PATCH] deleted unneccessary looping queries in EntityCache --- 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 19297fb1..57a3ea59 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).find_local(username) } + Rails.cache.fetch(to_key(:mention, username, domain), expires_in: MAX_EXPIRATION) { Account.select(:username, :domain, :url) } end def emoji(shortcodes, domain = nil)