import { CacheHandlerValue as CacheHandlerValue$1, CacheHandler } from 'next/dist/server/lib/incremental-cache'; import FileSystemCache from 'next/dist/server/lib/incremental-cache/file-system-cache'; type Revalidate = false | number; /** * A set of time periods and timestamps for controlling cache behavior. */ type LifespanParameters = { /** * The Unix timestamp (in seconds) for when the cache entry was last modified. */ readonly lastModifiedAt: number; /** * The Unix timestamp (in seconds) for when the cache entry entry becomes stale. * After this time, the entry is considered staled and may be used. */ readonly staleAt: number; /** * The Unix timestamp (in seconds) for when the cache entry must be removed from the cache. * After this time, the entry is considered expired and should not be used. */ readonly expireAt: number; /** * Time in seconds before the cache entry becomes stale. */ readonly staleAge: number; /** * Time in seconds before the cache entry becomes expired. */ readonly expireAge: number; /** * Value from Next.js revalidate option. May be false if the page has no revalidate option or the revalidate option is set to false. */ readonly revalidate: Revalidate | undefined; }; type CacheHandlerValue = CacheHandlerValue$1 & { /** * Timestamp in milliseconds when the cache entry was last modified. */ lastModified: number; /** * Tags associated with the cache entry. They are used for on-demand revalidation. */ tags: Readonly; /** * The lifespan parameters for the cache entry. * * Null for pages with `fallback: false` in `getStaticPaths`. * Consider these pages as always fresh and never stale. */ lifespan: LifespanParameters | null; }; type FileSystemCacheContext = ConstructorParameters[0]; type CacheHandlerParametersGet = Parameters; type CacheHandlerParametersSet = Parameters; type CacheHandlerParametersRevalidateTag = Parameters; export type { CacheHandlerValue as C, FileSystemCacheContext as F, Revalidate as R, CacheHandlerParametersGet as a, CacheHandlerParametersSet as b, CacheHandlerParametersRevalidateTag as c };