import type { QueryCacheEntry, QueryKey, QueryOptions } from "./types.js"; export declare class QueryCache { private cache; private gcInterval; constructor(); /** * Gets a query from the cache by key. */ get(queryKey: QueryKey): QueryCacheEntry | undefined; /** * Finds all entries matching a query key pattern. */ findAll(queryKey: QueryKey): QueryCacheEntry[]; /** * Gets or creates a query entry in the cache. */ getOrCreate(queryKey: QueryKey, queryFn: () => Promise, options: QueryOptions, defaultOptions?: Partial, "queryKey" | "queryFn">>): QueryCacheEntry; /** * Sets query data directly in the cache. */ setData(queryKey: QueryKey, data: TData): void; /** * Marks queries as stale (invalidates them). */ invalidate(queryKey: QueryKey): void; /** * Removes a query from the cache. */ remove(queryKey: QueryKey): void; /** * Clears all queries from the cache. */ clear(): void; /** * Subscribes to query updates. */ subscribe(queryKey: QueryKey, callback: () => void): () => void; /** * Notifies all subscribers of a query entry. */ notifySubscribers(entry: QueryCacheEntry): void; /** * Checks if a query is stale. */ isStale(entry: QueryCacheEntry): boolean; /** * Checks if a query should be garbage collected. */ shouldGarbageCollect(entry: QueryCacheEntry): boolean; /** * Starts the garbage collection interval. */ private startGarbageCollection; /** * Stops the garbage collection interval. */ stopGarbageCollection(): void; /** * Garbage collects unused queries. */ private garbageCollect; /** * Creates initial query state. */ private createInitialState; } //# sourceMappingURL=query-cache.d.ts.map