class

Session::MemoryStore(T)

Inherits Session::QueryableStore < Enumerable < Session::Store < Reference < Object

Constructors

new(sessions : Hash(String, T) = Hash(String, T).new)
Source

Instance methods

[](key : String) : T

Core store operations

Source
[]=(key : String, session : T) : T
Source
[]?(key : String) : T | Nil
Source
all_session_ids

Get all session IDs

Source
bulk_delete

Delete all sessions matching a predicate

Source
cleanup_expired

Clean up expired sessions

Source
clear
Source
delete(key : String)
Source
each

Must yield this collection's elements to the block.

Source
each_session

Iterate over all sessions matching a predicate

Source
encrypts_with_secret?

Sessions stay in this process as objects: nothing is encrypted, so the secret is never read (encrypt_redis_data, set by the :production, :high_security and :clustered presets, does not apply).

Source
memory_stats

Get memory usage statistics

Source
sessions
Source
size

Returns the number of elements in the collection.

[1, 2, 3, 4].size # => 4
Source
storage

Storage abstraction - must be implemented by subclasses

Source