MemorySessionStorage<T> class

In-memory session storage implementation.

This storage keeps all session data in memory and will be lost when the application terminates. It's suitable for development and testing, but not recommended for production use.

Implemented types

Constructors

MemorySessionStorage.new()
Creates a new instance of MemorySessionStorage.

Properties

hashCode int
The hash code for this object.
no setterinherited
keys Iterable<String>
Gets all session keys.
no setter
length int
Gets the number of stored sessions.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Removes all session data.
override
get(String key) Future<T?>
Retrieves session data for the given key.
override
has(String key) Future<bool>
Checks if session data exists for the given key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key) Future<bool>
Removes session data for the given key.
override
set(String key, T value) Future<void>
Stores session data for the given key.
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited