This commit is contained in:
Kismet Hasanaj
2026-05-02 20:07:02 +02:00
parent ce8672e283
commit 34dc9aec52
9428 changed files with 1733330 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import type { CacheEntry } from '../lib/cache-handlers/types';
import { type SearchParams } from '../request/search-params';
import type { Params } from '../request/params';
export interface UseCachePageProps {
params: Promise<Params>;
searchParams: Promise<SearchParams>;
$$isPage: true;
}
export type UseCacheLayoutProps = {
params: Promise<Params>;
$$isLayout: true;
} & {
[slot: string]: any;
};
export interface CollectedCacheResult {
entry: CacheEntry;
/**
* Whether the revalidate value was explicitly set via `cacheLife()`.
* - `true`: explicitly set
* - `false`: implicit (propagated from a nested cache or implicitly using the
* default profile)
* - `undefined`: unknown (e.g. pre-existing entry from a cache handler)
*/
hasExplicitRevalidate: boolean | undefined;
/**
* Whether the expire value was explicitly set via `cacheLife()`.
* - `true`: explicitly set
* - `false`: implicit (propagated from a nested cache or implicitly using the
* default profile)
* - `undefined`: unknown (e.g. pre-existing entry from a cache handler)
*/
hasExplicitExpire: boolean | undefined;
/**
* The root param names that were read during cache entry generation.
* Used to compute the specific cache key after generation completes.
* `undefined` for pre-existing entries from cache handlers where we
* don't have this information.
*/
readRootParamNames: ReadonlySet<string> | undefined;
}
export declare function cache(kind: string, id: string, boundArgsLength: number, originalFn: (...args: unknown[]) => Promise<unknown>, args: unknown[]): Promise<unknown>;