Opens or creates a native BlobCache owned by the caller.
Directory, positive byte capacity, and optional counter count.
An open cache that must be closed at application shutdown.
const cache = openBlobCache({ directory: ".dex-cache", maxBytes: 64 * 1024 ** 2 });try { cache.put("blob-1", new Uint8Array([1, 2])); } finally { cache.close(); } Copy
const cache = openBlobCache({ directory: ".dex-cache", maxBytes: 64 * 1024 ** 2 });try { cache.put("blob-1", new Uint8Array([1, 2])); } finally { cache.close(); }
TypeError when the directory is empty.
RangeError when a numeric setting is invalid.
Opens or creates a native BlobCache owned by the caller.