UNPKG

hypershield

Version:

Middleware suite for high-performance and resilient APIs

20 lines 709 B
import { CacheConfig } from '../../../core/types/config'; export declare class CacheService { private provider; private config; constructor(config: CacheConfig); private initializeProvider; get<T>(key: string): Promise<T | null>; set<T>(key: string, value: T, ttl?: number): Promise<void>; delete(key: string): Promise<void>; clear(): Promise<void>; has(key: string): Promise<boolean>; getOrSet<T>(key: string, factory: () => Promise<T>, ttl?: number): Promise<T>; mget<T>(keys: string[]): Promise<(T | null)[]>; mset(entries: { key: string; value: any; ttl?: number; }[]): Promise<void>; } //# sourceMappingURL=cacheService.d.ts.map