module HTTPSession::StorageInterface(T)

Overview

Defines the storage backend interface used by HTTPSession::Manager.

Direct including types

Defined in:

storage.cr

Instance Method Summary

Instance Method Detail

abstract def [](session_id : String) : T | Nil #

Fetches the storage value for session_id. Returns nil if no value exists.


[View source]
abstract def []=(session_id : String, session : T) : Nil #

Sets the storage value for session_id.


[View source]
abstract def delete(session_id : String) : Nil #

Deletes the storage value for session_id.


[View source]
def has?(session_id : String) : Bool #

Returns true if session_id exists.


[View source]
abstract def new_session_id : String #

Generates a new and unused session_id.


[View source]