Skip to content

@loontail/minecraft-kit v0.8.14 / MemoryCacheOptions

Type alias: MemoryCacheOptions

ts
type MemoryCacheOptions: {
  maxEntries: number;
  ttlMs: number;
};

Inputs to createMemoryCache.

Example

ts
import { createMemoryCache, type MemoryCacheOptions } from "@loontail/minecraft-kit";

const options: MemoryCacheOptions = { maxEntries: 256, ttlMs: 5 * 60 * 1000 };
const cache = createMemoryCache(options);

Type declaration

MemberType
maxEntriesnumber
ttlMsnumber

Source

src/http/cache.ts:16

MIT License