Rename cache-key in ReactionsController (#19368)
* Update ReactionsController#cached_user_public_comment_actions cache_key * Change cached_user_public_comment_reactions main key naming
This commit is contained in:
parent
2c759ca4dc
commit
8b1a825397
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ class ReactionsController < ApplicationController
|
|||
end
|
||||
|
||||
def cached_user_public_comment_reactions(user, comment_ids)
|
||||
cache = Rails.cache.fetch("cached-user-#{user.id}-reaction-ids-#{user.public_reactions_count}",
|
||||
cache = Rails.cache.fetch("#{user.cache_key}/public-comment-reactions-#{user.public_reactions_count}",
|
||||
expires_in: 24.hours) do
|
||||
user.reactions.public_category.where(reactable_type: "Comment").each_with_object({}) do |r, h|
|
||||
h[r.reactable_id] = r.attributes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue