hatch-surf/node_modules/next/dist/server/resume-data-cache/cache-store.d.ts
Riley Zhang df378d33ef
Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Merge GitHub main into Gitea repo (allow unrelated histories)
Resolved conflicts by taking GitHub versions for:
- .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml

Kept deploy.sh updated to:
- Pull from GitHub (primary source)
- Push to Gitea (push-mirror)
- Build from site/ directory (GitHub structure)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-06-25 05:20:46 +02:00

54 lines
2.1 KiB
TypeScript

import type { CachedFetchValue } from '../response-cache/types';
import type { CollectedCacheResult } from '../use-cache/use-cache-wrapper';
/**
* A generic cache store type that provides a subset of Map functionality
*/
type CacheStore<T> = Pick<Map<string, T>, 'entries' | 'keys' | 'size' | 'get' | 'set' | typeof Symbol.iterator>;
/**
* A cache store specifically for fetch cache values
*/
export type FetchCacheStore = CacheStore<CachedFetchValue>;
/**
* A cache store for encrypted bound args of inline server functions.
*/
export type EncryptedBoundArgsCacheStore = CacheStore<string>;
/**
* An in-memory-only cache store for decrypted bound args of inline server
* functions.
*/
export type DecryptedBoundArgsCacheStore = CacheStore<string>;
/**
* Serialized format for "use cache" entries
*/
export interface UseCacheCacheStoreSerialized {
entry: {
value: string;
tags: string[];
stale: number;
timestamp: number;
expire: number;
revalidate: number;
};
hasExplicitRevalidate: boolean | undefined;
hasExplicitExpire: boolean | undefined;
readRootParamNames: string[] | undefined;
}
/**
* A cache store specifically for "use cache" values that stores promises of
* collected cache results (entry + metadata).
*/
export type UseCacheCacheStore = CacheStore<Promise<CollectedCacheResult>>;
/**
* Parses serialized cache entries into a UseCacheCacheStore
* @param entries - The serialized entries to parse
* @returns A new UseCacheCacheStore containing the parsed entries
*/
export declare function parseUseCacheCacheStore(entries: Iterable<[string, UseCacheCacheStoreSerialized]>): UseCacheCacheStore;
/**
* Serializes UseCacheCacheStore entries into an array of key-value pairs
* @param entries - The store entries to stringify
* @returns A promise that resolves to an array of key-value pairs with serialized values
*/
export declare function serializeUseCacheCacheStore(entries: IterableIterator<[string, Promise<CollectedCacheResult>]>, isCacheComponentsEnabled: boolean): Promise<Array<[string, UseCacheCacheStoreSerialized] | null>>;
export {};