@duongtrungnguyen/next-helper
Version:
Helper library for Next.js 15
16 lines • 619 B
TypeScript
import type { QueryKey } from "./types";
declare class QueryCache {
private cache;
private getKeyString;
get<TData>(queryKey: QueryKey): TData | undefined;
set<TData>(queryKey: QueryKey, data: TData, staleTime?: number, cacheTime?: number): void;
isStale(queryKey: QueryKey): boolean;
subscribe(queryKey: QueryKey, callback: () => void): () => void;
invalidate(queryKey: QueryKey): void;
remove(queryKey: QueryKey): void;
clear(): void;
getMatchingKeys(queryKey: QueryKey): QueryKey[];
}
export declare const queryCache: QueryCache;
export {};
//# sourceMappingURL=cache.d.ts.map