Appearance
@loontail/minecraft-kit v0.8.14 / createMemoryCache
Function: createMemoryCache()
ts
function createMemoryCache(options): MetadataCacheIn-memory metadata cache backed by lru-cache. Suitable for short-lived processes; pass a custom MetadataCache to share entries across runs (Redis, disk, etc.).
Parameters
| Parameter | Type |
|---|---|
options | MemoryCacheOptions |
Returns
Example
ts
import { createMemoryCache, MinecraftKit } from "@loontail/minecraft-kit";
const cache = createMemoryCache({ maxEntries: 128 });
const kit = new MinecraftKit({ cache });
// Version manifests and asset indexes are cached across kit operations.