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

x/deno_nest/modules/cache/src/cache.interceptor.ts>CacheInterceptor

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

Constructors

new
CacheInterceptor(cacheModuleOptions?: CacheModuleOptions)

Properties

cacheMap: Map<string, ICacheStore>
optional
isDebug: boolean
memoryCache: MemoryStore
policy: CachePolicy
storeName: string
ttl: number

Methods

private
getCacheKey(params: { constructorName: string; methodName: string; methodType: string; args: any[]; }): string
private
getTTL(func: any): number
getCaches(func: any): Promise<{ storeName: string; caches: ICacheStore | undefined; }>
initStore(storeName: CacheStoreName): Promise<void>
intercept(
context: Context,
next: Next,
)
joinArgs(args: any[])
log(...args: any[])
setCacheHeaderByPolicy(
func: any,
context: Context,
ttl?: number,
)