Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/alosaur/src/security/session/mod.ts>MemoryStore

Alosaur - Deno web framework with many decorators
Go to Latest
class MemoryStore
implements SessionStore
import { MemoryStore } from "https://deno.land/x/alosaur@v0.33.0/src/security/session/mod.ts";

Store for sessions in memory

Type Parameters

optional
T = StringKeyObject

Properties

private
sessionMap: Map<string, StringKeyObject>

Methods

clear(): Promise<void>
create(sid: string): Promise<void>
delete(sid: string): Promise<void>
exist(sid: string): Promise<boolean>
get(sid: string): Promise<T | StringKeyObject | undefined>
getValue(sid: string, key: [keyof T] | any): Promise<T>
init(): Promise<void>
setValue(
sid: string,
key: [keyof T] | any,
value: any,
): Promise<void>