Utility class for managing external API response cache persistence.
Features:
Used by Cache.file for persistent caching of external API responses.
constructor();
PersistMeasureFactory: any
getMeasureStorage: any
readMeasureData: (bucket: string, key: string) => Promise<unknown>
Reads cached measure data for a given bucket and key.
writeMeasureData: (data: unknown, bucket: string, key: string) => Promise<void>
Writes measure data to disk with atomic file writes.
usePersistMeasureAdapter(Ctor: TPersistBaseCtor<string, unknown>): void;
Registers a custom persistence adapter.
useJson(): void;
Switches to the default JSON persist adapter.
useDummy(): void;
Switches to a dummy persist adapter that discards all writes.