Skip to content

bodhi-realtime-agent / MemoryCacheManager

Class: MemoryCacheManager

Defined in: core/memory-cache-manager.ts:13

Caches memory facts from a MemoryStore for quick in-session access.

Extracted from VoiceSession to isolate the memory caching concern. Callers use refresh() to reload from the store and facts to read the latest cached snapshot. Failures during refresh are non-fatal — the previous cache is retained.

Constructors

Constructor

new MemoryCacheManager(store, userId): MemoryCacheManager

Defined in: core/memory-cache-manager.ts:16

Parameters

store

MemoryStore

userId

string

Returns

MemoryCacheManager

Accessors

facts

Get Signature

get facts(): MemoryFact[]

Defined in: core/memory-cache-manager.ts:31

Return the current cached facts.

Returns

MemoryFact[]

Methods

refresh()

refresh(): Promise<void>

Defined in: core/memory-cache-manager.ts:22

Reload cached facts from the store. Best-effort: keeps stale cache on failure.

Returns

Promise<void>

Built with VitePress