Appearance
@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
| Property | Modifier | Type | Defined in |
|---|---|---|---|
maxEntries? | readonly | number | src/http/cache.ts:17 |
ttlMs? | readonly | number | src/http/cache.ts:18 |