cdk-nextjs
Version:
Deploy Next.js apps on AWS with CDK
22 lines (21 loc) • 927 B
TypeScript
import { CacheHandlerValue } from "next/dist/server/lib/incremental-cache";
import FileSystemCache from "next/dist/server/lib/incremental-cache/file-system-cache";
import { IncrementalCacheKindHint, IncrementalCacheValue } from "next/dist/server/response-cache";
export default class CdkNextjsCacheHandler extends FileSystemCache {
constructor(options: ConstructorParameters<typeof FileSystemCache>[0]);
get(cacheKey: string, ctx?: {
kindHint?: IncrementalCacheKindHint;
revalidate?: number | false;
fetchUrl?: string;
fetchIdx?: number;
tags?: string[];
softTags?: string[];
} | undefined): Promise<CacheHandlerValue | null>;
set(pathname: string, data: IncrementalCacheValue | null, ctx: {
revalidate?: number | false;
fetchCache?: boolean;
fetchUrl?: string;
fetchIdx?: number;
tags?: string[];
}): Promise<void>;
}