main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import type { CacheHandler, CacheHandlerContext, CacheHandlerValue } from './';
import { CacheFs } from '../../../shared/lib/utils';
type FileSystemCacheContext = Omit<CacheHandlerContext, 'fs' | 'serverDistDir'> & {
fs: CacheFs;
serverDistDir: string;
};
export default class FileSystemCache implements CacheHandler {
private fs;
private flushToDisk?;
private serverDistDir;
private appDir;
private tagsManifestPath?;
private revalidatedTags;
constructor(ctx: FileSystemCacheContext);
private loadTagsManifest;
revalidateTag(tag: string): Promise<void>;
get(key: string, { tags, softTags, fetchCache, }?: {
tags?: string[];
softTags?: string[];
fetchCache?: boolean;
}): Promise<CacheHandlerValue | null>;
set(key: string, data: CacheHandlerValue['value'], ctx: {
tags?: string[];
}): Promise<void>;
private getFsPath;
}
export {};