mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-08 16:32:54 +00:00
* feat: add per-agent sqlite cache store * fix: preserve sqlite cache adapter scope * chore: mark sqlite cache scaffold intentional
27 lines
627 B
TypeScript
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;
|
|
};
|