import { Type } from './types'; /** * cache manager inteface. * * @export * @interface ICacheManager */ export interface ICacheManager { /** * has cache * * @param {Type} targetType * @returns {boolean} * @memberof ICacheManager */ hasCache(targetType: Type): boolean; /** * cache target. * * @param {Type} targetType * @param {*} target * @param {number} expires * @memberof ICacheManager */ cache(targetType: Type, target: any, expires: number): any; /** * get cache target, if set expires will refresh cache timeout. * * @param {Type} targetType * @param {number} [expires] if set number will reset cache timeout. * @returns {*} * @memberof ICacheManager */ get(targetType: Type, expires?: number): any; /** * is check expires or not. * * @returns {boolean} * @memberof ICacheManager */ isChecking(): boolean; /** * run check expires. * * @memberof ICacheManager */ checkExpires(): any; /** * destory cache * * @param {Type} targetType * @param {*} [target] * @memberof ICacheManager */ destroy(targetType: Type, target?: any): any; }