Update application_controller.rb

This commit is contained in:
admin 2021-01-28 21:12:29 +00:00
parent d0b1f28430
commit cf691f491c
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@ class ApplicationController < ActionController::Base
end
def current_session
return nil if cookies.signed['_session_id'].nil?
@current_session ||= Rails.cache.fetch("dk:sess:#{cookies.signed['_session_id']}", expires_in: 25.hours) do
SessionActivation.find_by(session_id: cookies.signed['_session_id'])
end