CacheSessionStore class

Stores session payloads inside a cache repository while only persisting lightweight identifiers inside the client cookie.

Implemented types

Constructors

CacheSessionStore({required Repository repository, required List<SecureCookie> codecs, required Options defaultOptions, String cachePrefix = 'session:', Duration? lifetime})

Properties

cachePrefix String
Prefix added to cache keys to avoid collisions.
final
codecs List<SecureCookie>
Codec stack used to encode/decode session cookies.
final
defaultOptions Options
Default session options applied when creating a new session.
final
hashCode int
The hash code for this object.
no setterinherited
lifetime Duration
Lifetime of a session before it expires on the server.
final
repository Repository
Repository responsible for persisting session payloads.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(Request request, String name) Future<Session>
Reads an existing session or creates a new one if it does not exist.
override
toString() String
A string representation of this object.
inherited
write(Request request, Response response, Session session) Future<void>
Writes the session data to the underlying storage.
override

Operators

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