Skip to content

@loontail/minecraft-kit v0.8.14 / PersistentMetadataCache

Type alias: PersistentMetadataCache

ts
type PersistentMetadataCache: MetadataCache & {
  flush: Promise<void>;
};

Disk-backed MetadataCache plus a PersistentMetadataCache.flush hook for awaiting in-flight writes (e.g. on app quit, or in tests).

Example

ts
const cache = await createPersistentMetadataCache({ directory });
cache.set("k", { hello: "world" });
await cache.flush();

Type declaration

MemberTypeDescription
flushPromise<void>Resolve once every queued disk write/delete has settled.

Source

src/http/persistent-cache.ts:48

MIT License