UNPKG

ts-method-cache

Version:

Data method caching logic based on TypeScript decorators

13 lines (12 loc) 696 B
import { CacheType } from '../enum/cache-type.enum'; import { BaseCacheOptions } from '../interface/base-cache-options'; import { CacheContainerOptions } from '../interface/cache-container-options'; export declare function createCacheDecorator( type: CacheType, target: object, method: (...args: any[]) => any, options: BaseCacheOptions ): () => any; export declare function createCacheContainerDecorator(options: CacheContainerOptions): ClassDecorator; export declare function normalizeCacheSettings<U extends BaseCacheOptions>(options?: U | string): U; export declare function normalizeCacheContainerSettings(options: CacheContainerOptions | string): CacheContainerOptions;