dino-core
Version:
A dependency injection framework for NodeJS applications
24 lines (23 loc) • 780 B
TypeScript
import { type CacheOptions } from './cache.manager';
export declare class CacheContext {
private readonly cacheName;
private readonly excludedMethods;
private readonly cacheOptions;
/**
* Create a new cache context
*
* @param {String} cacheName the cache name
* @param {Array} excludedMethods the methods to exclude from caching
*/
private constructor();
getCacheName(): string;
getCacheOptions(): CacheOptions;
/**
* Determine if the cache is activated for the current method.
*
* @param {String} method the method name
* @returns {Boolean}
*/
isCacheActivatedFor(method: string): boolean;
static create(cacheName: string, excludedMethods?: string[], opts?: CacheOptions): CacheContext;
}