DefaultSessionCacheStrategy
DefaultSessionCacheStrategy
The default SessionCacheStrategy delegates to the configured CacheStrategy to store the session data. This should be suitable for most use-cases, assuming you select a suitable CacheStrategy
Signature
class DefaultSessionCacheStrategy implements SessionCacheStrategy {
protected cacheService: CacheService;
constructor(options?: {
ttl?: number;
cachePrefix?: string;
})
init(injector: Injector) => ;
set(session: CachedSession) => Promise<void>;
get(sessionToken: string) => Promise<CachedSession | undefined>;
delete(sessionToken: string) => void | Promise<void>;
clear() => Promise<void>;
}
- Implements:
SessionCacheStrategy
cacheService
property
constructor
method
(options?: {
ttl?: number;
cachePrefix?: string;
}) => DefaultSessionCacheStrategy
init
method
(injector: Injector) =>
set
method
(session: CachedSession) => Promise<void>
get
method
(sessionToken: string) => Promise<CachedSession | undefined>
delete
method
(sessionToken: string) => void | Promise<void>
clear
method
() => Promise<void>