Files
nanobot/webui/src/lib/webui-thread-cache.ts
T

14 lines
460 B
TypeScript
Raw Normal View History

2026-09-12 04:37:37 +08:00
import { MemoryLruCache } from "./memory-lru-cache";
import type { WebuiThreadPersistedPayload } from "./types";
/** Process-local canonical replay cache used for stale-while-revalidate session entry. */
export class WebuiThreadCache extends MemoryLruCache<WebuiThreadPersistedPayload> {
constructor(
maxBytes = 16 * 1024 * 1024,
maxEntries = 12,
) {
super(maxBytes, maxEntries);
}
}
export const webuiThreadCache = new WebuiThreadCache();