@signalwire/docusaurus-plugin-llms-txt
Version:
Generate Markdown versions of Docusaurus HTML pages and an llms.txt index file
40 lines • 1.01 kB
TypeScript
/**
* Cache I/O operations
* Focused module for cache file reading, writing, and atomic operations
*/
import type { CacheSchema } from '../types';
/**
* Cache file I/O handler
*/
export declare class CacheIO {
private readonly _cachePath;
private readonly _logger;
constructor(_cachePath: string, _logger: {
warn: (_msg: string) => void;
});
/**
* Load cache from disk, returning empty cache if file doesn't exist
*/
loadCache(): Promise<CacheSchema>;
/**
* Save cache to disk atomically
*/
saveCache(cache: CacheSchema): Promise<void>;
/**
* Atomically writes JSON data to filePath
* Uses temporary file + rename for atomic operation
*/
private writeJsonAtomic;
/**
* Clear corrupted cache file
*/
private clearCorruptedCache;
/**
* Get cache file information for debugging
*/
getCacheInfo(): {
dir: string;
path: string;
};
}
//# sourceMappingURL=cache-io.d.ts.map