Fix: #220 インスタンス情報更新時に、スタンプ利用可否のキャッシュをクリアする処理 (#224)

This commit is contained in:
KMY(雪あすか) 2023-11-03 08:22:56 +09:00 committed by GitHub
parent 37779910df
commit c3578970e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,8 @@
#
class InstanceInfo < ApplicationRecord
after_commit :reset_cache
EMOJI_REACTION_AVAILABLE_SOFTWARES = %w(
misskey
calckey
@ -43,4 +45,8 @@ class InstanceInfo < ApplicationRecord
features.include?('emoji_reaction')
end
def reset_cache
Rails.cache.delete("emoji_reaction_available_domain:#{domain}")
end
end