securityos/node_modules/next/dist/server/lib/incremental-cache/fetch-cache.d.ts

25 lines
851 B
TypeScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
import type { CacheHandler, CacheHandlerContext, CacheHandlerValue } from './';
export default class FetchCache implements CacheHandler {
private headers;
private cacheEndpoint?;
private debug;
static isAvailable(ctx: {
_requestHeaders: CacheHandlerContext['_requestHeaders'];
}): boolean;
constructor(ctx: CacheHandlerContext);
revalidateTag(tag: string): Promise<void>;
get(key: string, ctx: {
tags?: string[];
softTags?: string[];
fetchCache?: boolean;
fetchUrl?: string;
fetchIdx?: number;
}): Promise<CacheHandlerValue | null>;
set(key: string, data: CacheHandlerValue['value'], { fetchCache, fetchIdx, fetchUrl, tags, }: {
tags?: string[];
fetchCache?: boolean;
fetchUrl?: string;
fetchIdx?: number;
}): Promise<void>;
}