Files
openclaw/src/agents/cache/agent-cache-store.ts
Peter Steinberger fc50f949d4 Add per-agent SQLite cache store (#88349)
* feat: add per-agent sqlite cache store

* fix: preserve sqlite cache adapter scope

* chore: mark sqlite cache scaffold intentional
2026-05-30 17:00:24 +01:00

27 lines
627 B
TypeScript

export type AgentRuntimeCacheValue = {
agentId: string;
scope: string;
key: string;
value: unknown;
blob?: Buffer;
expiresAt: number | null;
updatedAt: number;
};
export type AgentRuntimeCacheWriteOptions = {
key: string;
value?: unknown;
blob?: Buffer | string;
expiresAt?: number | null;
ttlMs?: number;
};
export type AgentRuntimeCacheStore = {
write(options: AgentRuntimeCacheWriteOptions): AgentRuntimeCacheValue;
read(key: string): AgentRuntimeCacheValue | null;
list(): AgentRuntimeCacheValue[];
delete(key: string): boolean;
clear(): number;
clearExpired(now?: number): number;
};