Add: #699 引用・参照対応サーバーをAPIで取得 (#711)

* Add: #699 引用・参照対応サーバーをAPIで取得

* Complete

* ごめん
This commit is contained in:
KMY(雪あすか) 2024-04-16 12:58:54 +09:00 committed by GitHub
parent 78b2707c08
commit 1c054ed3a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 129 additions and 29 deletions

View file

@ -31,6 +31,8 @@ class EntityCache
uncached.each_value { |item| Rails.cache.write(to_key(:emoji, item.shortcode, domain), item, expires_in: MAX_EXPIRATION) }
end
uncached ||= {}
shortcodes.filter_map { |shortcode| cached[to_key(:emoji, shortcode, domain)] || uncached[shortcode] }
end