import { Cacheable, LeprechaunCacheOptions } from './types';
export declare class LeprechaunCache<T extends Cacheable = Cacheable> {
    private softTtlMs;
    private hardTtlMs;
    private lockTtlMs;
    private waitTimeMs;
    private returnStale;
    private spinWaitCount;
    private cacheStore;
    private spinMs;
    private inProgress;
    private onMiss;
    private keyPrefix;
    private onBackgroundError;
    constructor({ keyPrefix, softTtlMs, hardTtlMs, lockTtlMs, waitTimeMs, waitForUnlockMs, cacheStore, spinMs, returnStale, onMiss, onBackgroundError }: LeprechaunCacheOptions<T>);
    clear(key: string): Promise<boolean>;
    get(key: string): Promise<T>;
    refresh(key: string): Promise<T>;
    private doGet;
    private race;
    private spinLock;
    private updateCache;
    private unlock;
    private setAndUnlock;
}
