import { Keyable } from './Keyable'; import { CreateStorageFn } from './ICacheStorage'; export interface SimpleCacheOptions { ttlSeconds?: number; maxSize?: number; /** Factory function to create storage. Defaults to in-memory TTLCacheStorage */ createStorageFn: CreateStorageFn | undefined; } export declare class SimpleCache { private readonly storage; private pendingFetches; /** * @param options.ttlSeconds Optional time-to-live for cache entries in seconds. If not provided, cache entries do not expire. * @param options.maxSize Optional maximum number of entries in the cache. * @param options.createStorageFn Optional factory to create storage backend. Defaults to in-memory TTLCache. */ constructor(options: SimpleCacheOptions); get(key: Keyable): Promise; add(key: Keyable, value: V): Promise; remove(key: Keyable): Promise; clear(): Promise; /** * Executes a function to fetch a value if it's not in the cache, * stores the result, and returns it. */ executeUsingCache(key: Keyable, fetchFn: (key: Keyable) => Promise, opts?: { skipCache?: boolean; }): Promise; } //# sourceMappingURL=SimpleCache.d.ts.map