This repository has been archived on 2026-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novarix-networks-homepage/node_modules/next/dist/server/use-cache/use-cache-wrapper.d.ts
T
Kismet Hasanaj 34dc9aec52 .
2026-05-02 20:07:02 +02:00

42 lines
1.7 KiB
TypeScript

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>;