Moved user-github-token to Redis (#4710)

This commit is contained in:
Ibrahim Khan 2019-11-05 04:05:24 +06:00 committed by Ben Halpern
parent 73de48e370
commit 9c0bb311bf

View file

@ -159,7 +159,7 @@ class ChatChannelsController < ApplicationController
end
def generate_github_token
Rails.cache.fetch("user-github-token-#{current_user.id}", expires_in: 48.hours) do
RedisRailsCache.fetch("user-github-token-#{current_user.id}", expires_in: 48.hours) do
Identity.where(user_id: current_user.id, provider: "github").first&.token
end
end