declare type Timer = ReturnType<typeof setTimeout>;
declare type CachedKey = string | number;
declare type Listener = (data: unknown) => void;
declare const setCache: (key: CachedKey, cacheTime: number, data: unknown, params: unknown, staleTime?: number, loading?: boolean) => void;
declare const getCache: (key: CachedKey) => {
    loading: boolean;
    data?: unknown;
    params?: unknown;
    timer?: Timer | undefined;
    time?: number | undefined;
    staleTime?: number | undefined;
} | undefined;
declare const subscribe: (key: string, listener: Listener) => () => void;
declare const clearCache: (key?: string | string[] | undefined) => void;
export { getCache, setCache, subscribe, clearCache };
