UNPKG

@gabliam/cache

Version:
28 lines (27 loc) 679 B
import { CacheOptions } from './cache-options'; /** * Type of the `Cacheable` decorator / constructor function. */ export interface CacheableDecorator { /** * Decorator that marks a method triggers a cache operation. * * @usageNotes * * ```typescript * @Service() * class SampleController { * @Cacheable('test') * saveToDatabase(entity: any) { * } * } * ``` * */ (value?: string | string[] | CacheOptions): MethodDecorator; /** * see the `@Cacheable` decorator. */ new (value?: string | string[] | CacheOptions): any; } export declare const Cacheable: CacheableDecorator;