Skip to content

MemoryCacheStore

Defined in: packages/mcp-query/src/core/cacheStore.ts:26

In-process store with a shared pub/sub bus — useful for tests and for several MCPClients in one process. (Across processes, use a Redis-backed store; see mcp-query/redis.)

new MemoryCacheStore(): MemoryCacheStore

MemoryCacheStore

delete(key): Promise<void>

Defined in: packages/mcp-query/src/core/cacheStore.ts:36

string

Promise<void>

CacheStore.delete


get(key): Promise<StoredEntry | undefined>

Defined in: packages/mcp-query/src/core/cacheStore.ts:30

string

Promise<StoredEntry | undefined>

CacheStore.get


publishInvalidation(tags): Promise<void>

Defined in: packages/mcp-query/src/core/cacheStore.ts:39

Broadcast a tag invalidation to other nodes (declared invalidations only).

string[]

Promise<void>

CacheStore.publishInvalidation


set(key, entry): Promise<void>

Defined in: packages/mcp-query/src/core/cacheStore.ts:33

string

StoredEntry

Promise<void>

CacheStore.set


subscribeInvalidations(cb): () => void

Defined in: packages/mcp-query/src/core/cacheStore.ts:42

Receive other nodes’ invalidations. Returns unsubscribe.

(tags) => void

() => void

CacheStore.subscribeInvalidations