Skip to main content
Version: 2.4.0

Cache

Cache: {
FileSystem: (cacheDirectory: string, debug?: boolean) => Cache;
FileSystemDefault: Cache;
None: Cache;
};

Defined in: lib/proof-system/cache.ts:25

Type declaration

FileSystem()

FileSystem: (cacheDirectory: string, debug?: boolean) => Cache;

Store data on the file system, in a directory of your choice.

Data will be stored in two files per cache entry: a data file and a .header file. The header file just contains a unique string which is used to determine whether we can use the cached data.

Note: this Cache only caches data in Node.js.

Parameters

cacheDirectory

string

debug?

boolean

Returns

Cache

FileSystemDefault

FileSystemDefault: Cache;

Store data on the file system, in a standard cache directory depending on the OS.

Data will be stored in two files per cache entry: a data file and a .header file. The header file just contains a unique string which is used to determine whether we can use the cached data.

Note: this Cache only caches data in Node.js.

None

None: Cache;

Don't store anything.