Skip to content

@loontail/minecraft-kit / MemoryCacheOptions

Type Alias: MemoryCacheOptions

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

Defined in: src/http/cache.ts:16

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);

Properties

PropertyModifierTypeDefined in
maxEntries?readonlynumbersrc/http/cache.ts:17
ttlMs?readonlynumbersrc/http/cache.ts:18

MIT License