Revert "deleted unneccessary looping queries in EntityCache"

This reverts commit d20330f391.
This commit is contained in:
Fosco Marotto 2021-02-03 13:13:29 -05:00
parent c30f600f09
commit e4a214a0c4
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class EntityCache
MAX_EXPIRATION = 7.days.freeze MAX_EXPIRATION = 7.days.freeze
def mention(username, domain) 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 end
def emoji(shortcodes, domain = nil) def emoji(shortcodes, domain = nil)