refactor(agents): hide sqlite cache store internals · openclaw/openclaw@768704e
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -28,13 +28,13 @@ import type {
|
28 | 28 | } from "./agent-cache-store.js"; |
29 | 29 | |
30 | 30 | /** Options for an agent/scope-scoped SQLite runtime cache. */ |
31 | | -export type SqliteAgentCacheStoreOptions = OpenClawAgentDatabaseOptions & { |
| 31 | +type SqliteAgentCacheStoreOptions = OpenClawAgentDatabaseOptions & { |
32 | 32 | scope: string; |
33 | 33 | now?: () => number; |
34 | 34 | }; |
35 | 35 | |
36 | 36 | /** Options for writing a single SQLite agent cache entry. */ |
37 | | -export type WriteSqliteAgentCacheEntryOptions = SqliteAgentCacheStoreOptions & |
| 37 | +type WriteSqliteAgentCacheEntryOptions = SqliteAgentCacheStoreOptions & |
38 | 38 | AgentRuntimeCacheWriteOptions; |
39 | 39 | |
40 | 40 | type CacheEntriesTable = OpenClawAgentKyselyDatabase["cache_entries"]; |
@@ -297,7 +297,7 @@ export function clearExpiredSqliteAgentCacheEntries(
|
297 | 297 | } |
298 | 298 | |
299 | 299 | /** Agent runtime cache store implementation backed by OpenClaw's SQLite DB. */ |
300 | | -export class SqliteAgentCacheStore implements AgentRuntimeCacheStore { |
| 300 | +class SqliteAgentCacheStore implements AgentRuntimeCacheStore { |
301 | 301 | readonly #options: SqliteAgentCacheStoreOptions; |
302 | 302 | |
303 | 303 | constructor(options: SqliteAgentCacheStoreOptions) { |
@@ -349,6 +349,6 @@ export class SqliteAgentCacheStore implements AgentRuntimeCacheStore {
|
349 | 349 | /** Create a SQLite-backed agent runtime cache store. */ |
350 | 350 | export function createSqliteAgentCacheStore( |
351 | 351 | options: SqliteAgentCacheStoreOptions, |
352 | | -): SqliteAgentCacheStore { |
| 352 | +): AgentRuntimeCacheStore { |
353 | 353 | return new SqliteAgentCacheStore(options); |
354 | 354 | } |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。