module Athena::HTTP::Session::Storage::Handler::Interface
#
Persists the data of sessions, identified by their ID.
Handlers only store the data; AHTTP::Session::Storage manages the session's lifecycle.
Direct including types
Athena::HTTP::Session::Storage::Handler::AbstractHandler
Methods#
abstract #destroy(session_id : String) : Bool#
Removes the session with the provided session_id.
Returns true if it no longer exists, otherwise false.
abstract #gc(max_lifetime : Int32) : Int32#
Removes the sessions that were not used in the last max_lifetime seconds. Returns how many sessions were removed.
abstract #read(session_id : String) : String#
Returns the data of the session with the provided session_id, or an empty string if it does not exist or has expired.
abstract #update_timestamp(session_id : String, data : String) : Bool#
Updates when the session with the provided session_id was last used, without changing its data.
Returns true if it was updated, otherwise false.
abstract #write(session_id : String, data : String) : Bool#
Persists the provided data as that of the session with the provided session_id.
Returns true if it was persisted, otherwise false.