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

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

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

Constructors

new
KVStore(options?: { ttl?: number; baseKey?: string; })

Properties

baseKey: string
optional
ttl: number

Methods

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