app/helpers/sessions_helper.rb
# Set session timestamp. For efficiency, we only do this if the last
# session timestamp is more than RESET_SESSION_TIMER ago.
# This efficiency measure avoids constantly updating the session cookie
# for many closely-related interactions (as is typical).
Set session timestamp. For efficiency, we only do this if the last
session timestamp is more than RESET_SESSION_TIMER ago.
This efficiency measure avoids constantly updating the session cookie
for many closely-related interactions (as is typical).
Set session timestamp . For efficiency we only do this if the last session timestamp is more than RESET_SESSION_TIMER ago . This efficiency measure avoids constantly updating the session cookie for many closely - related interactions ( as is typical ) .
def persist_session_timestamp
    return unless logged_in? && !session.key?(:make_old)
    old = !session.key?(:time_last_used) ||
          (session[:time_last_used] < RESET_SESSION_TIMER.ago.utc)
    session[:time_last_used] = Time.now.utc if old
  end
def persist_session_timestamp return unless logged_in? && ! session . key? ( :make_old ) old = ! session . key? ( :time_last_used ) || ( session [ :time_last_used ] < RESET_SESSION_TIMER . ago . utc ) session [ :time_last_used ] = Time . now . utc if old end
Set session timestamp.
Set session timestamp .