Add entity cache (#7271)
* Add entity cache Use a caching layer for mentions and custom emojis that are dynamically extracted from text. Reduce duplicate text extractions * Fix code style issue
This commit is contained in:
@ -391,7 +391,7 @@ class Account < ApplicationRecord
|
||||
end
|
||||
|
||||
def emojis
|
||||
CustomEmoji.from_text(note, domain)
|
||||
@emojis ||= CustomEmoji.from_text(note, domain)
|
||||
end
|
||||
|
||||
before_create :generate_keys
|
||||
|
Reference in New Issue
Block a user