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

x/deno_nest/modules/cache/src/cache.store.ts>MemoryStore

Refer to nestjs to realize some common functions for Deno, support hono and oak
Latest
class MemoryStore
implements ICacheStore
import { MemoryStore } from "https://deno.land/x/deno_nest@v3.15.1/modules/cache/src/cache.store.ts";

Constructors

new
MemoryStore(options?: { ttl?: number; })

Properties

cache: Map<string, any>
timeoutMap: Map<string, number>
optional
ttl: number

Methods

clear(): void | Promise<void>
delete(key: string)
get<T = any>(key: string): T
has(key: string): boolean | Promise<boolean>
set(
key: string,
value: any,
options?: { ttl: number; },
)
size(): number | Promise<number>