Move user_data async controller cache to Redis (#4809) [deploy]
This commit is contained in:
parent
b57ced5466
commit
880f60beff
1 changed files with 2 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ class AsyncInfoController < ApplicationController
|
|||
end
|
||||
|
||||
def user_data
|
||||
Rails.cache.fetch(user_cache_key, expires_in: 15.minutes) do
|
||||
RedisRailsCache.fetch(user_cache_key, expires_in: 15.minutes) do
|
||||
{
|
||||
id: @user.id,
|
||||
name: @user.name,
|
||||
|
|
@ -60,7 +60,7 @@ class AsyncInfoController < ApplicationController
|
|||
end
|
||||
|
||||
def user_cache_key
|
||||
"#{current_user&.id}__
|
||||
"user-info-#{current_user&.id}__
|
||||
#{current_user&.last_sign_in_at}__
|
||||
#{current_user&.last_followed_at}__
|
||||
#{current_user&.updated_at}__
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue