Skip to main content
Module

x/alosaur/security.ts>MemoryStore

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
class MemoryStore
implements SessionStore
import { MemoryStore } from "https://deno.land/x/alosaur@v1.1.0/security.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>