diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-04-27 01:38:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-27 01:38:10 +0200 |
commit | a872392cd958167d5d9dd3fef613415cc9068774 (patch) | |
tree | b062e9d8c7e87c29c74fb5416f3f60f39a172301 /app/models/status.rb | |
parent | 63553c6b5c927950a45c5acb5af32af0dacee8c9 (diff) |
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
Diffstat (limited to 'app/models/status.rb')
-rw-r--r-- | app/models/status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index 37f2db562..fbb1f89aa 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -160,7 +160,7 @@ class Status < ApplicationRecord end def emojis - CustomEmoji.from_text([spoiler_text, text].join(' '), account.domain) + @emojis ||= CustomEmoji.from_text([spoiler_text, text].join(' '), account.domain) end after_create_commit :store_uri, if: :local? |