import { ICacheService } from './cache.protocol.js';

declare class MemoryCacheService implements ICacheService {
    private readonly defaultTtl;
    private readonly store;
    private readonly timers;
    /** In-flight getOrSet promises — keyed by cache key to deduplicate stampedes. */
    private readonly inflight;
    constructor(defaultTtl?: number | null);
    get<T = unknown>(key: string): Promise<T | null>;
    set<T = unknown>(key: string, value: T, ttlSeconds?: number): Promise<void>;
    delete(key: string): Promise<void>;
    invalidateByPrefix(prefix: string): Promise<number>;
    has(key: string): Promise<boolean>;
    getOrSet<T = unknown>(key: string, factory: () => Promise<T>, ttlSeconds?: number): Promise<T>;
    /** Remove a key from store and cancel its expiry timer. */
    private evict;
    private clearTimer;
}

export { MemoryCacheService };
