Appearance
@loontail/minecraft-kit / PersistentMetadataCache
Type Alias: PersistentMetadataCache
ts
type PersistentMetadataCache = MetadataCache & {
flush: Promise<void>;
};Defined in: src/http/persistent-cache.ts:48
Disk-backed MetadataCache plus a PersistentMetadataCache.flush hook for awaiting in-flight writes (e.g. on app quit, or in tests).
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
flush() | () => Promise<void> | Resolve once every queued disk write/delete has settled. | src/http/persistent-cache.ts:50 |
Example
ts
const cache = await createPersistentMetadataCache({ directory });
cache.set("k", { hello: "world" });
await cache.flush();