UNPKG

dino-core

Version:

A dependency injection framework for NodeJS applications

18 lines (17 loc) 775 B
import { type CacheContext } from '../../cache/cache.context'; import { type Injectable } from '../../injectable'; import { AbstractInterceptor } from './abstract.interceptors'; /** * Implement an "around" interceptor that provide caching functionalities */ export declare class CacheInterceptor extends AbstractInterceptor { private static _instance; private readonly cacheManager; private readonly cacheKeyGenerator; constructor(); intercept(obj: Injectable, prop: string): any; isApplicable(obj: Injectable, prop: string): boolean; get(cacheContext: CacheContext | null | undefined, ...args: unknown[]): any; set(cacheContext: CacheContext | null | undefined, data: any, ...args: unknown[]): any; static create(): CacheInterceptor; }