[deploy] Fix unable to unfollow tags (#10324)
This commit is contained in:
parent
cc15266238
commit
fb707621d0
2 changed files with 3 additions and 1 deletions
|
|
@ -74,6 +74,7 @@ class AsyncInfoController < ApplicationController
|
|||
def user_cache_key
|
||||
"user-info-#{current_user&.id}__
|
||||
#{current_user&.last_sign_in_at}__
|
||||
#{current_user&.following_tags_count}__
|
||||
#{current_user&.last_followed_at}__
|
||||
#{current_user&.updated_at}__
|
||||
#{current_user&.reactions_count}__
|
||||
|
|
|
|||
|
|
@ -19,7 +19,8 @@ class UserDecorator < ApplicationDecorator
|
|||
].freeze
|
||||
|
||||
def cached_followed_tags
|
||||
follows_map = Rails.cache.fetch("user-#{id}-#{last_followed_at&.rfc3339}/followed_tags", expires_in: 20.hours) do
|
||||
follows_map = Rails.cache.fetch("user-#{id}-#{following_tags_count}-#{last_followed_at&.rfc3339}/followed_tags",
|
||||
expires_in: 20.hours) do
|
||||
Follow.follower_tag(id).pluck(:followable_id, :points).to_h
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue