@jhzhu89/azure-client-pool
Version:
Azure client lifecycle management with intelligent caching and authentication
27 lines • 839 B
TypeScript
export interface CacheConfig {
maxSize: number;
slidingTtl: number;
absoluteTtl?: number;
}
export declare class CacheManager<T> {
private cacheType;
private cache;
private pendingRequests;
private absoluteTtl?;
private slidingTtl;
constructor(config: CacheConfig, cacheType: string);
private disposeEntry;
private createCacheEntry;
getOrCreate(cacheKey: string, factory: () => Promise<T>, contextInfo?: Record<string, unknown>, customTtl?: number): Promise<T>;
private createInternal;
clear(): void;
delete(cacheKey: string): boolean;
getStats(): {
size: number;
maxSize: number;
pendingRequests: number;
};
private createLoggableKey;
}
export declare function createStableCacheKey(rawKey: string): string;
//# sourceMappingURL=cache.d.ts.map