MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / chatCacheRead

Function chatCacheRead

app/src/modules/chat-cache.js:36–44  ·  view source on GitHub ↗
(cacheKey)

Source from the content-addressed store, hash-verified

34}
35
36export async function chatCacheRead(cacheKey) {
37 const db = await openChatCacheDb();
38 return new Promise((resolve, reject) => {
39 const tx = db.transaction(CHAT_CACHE_STORE, 'readonly');
40 const req = tx.objectStore(CHAT_CACHE_STORE).get(cacheKey);
41 req.onerror = () => reject(req.error || new Error('Failed to read chat cache'));
42 req.onsuccess = () => resolve(req.result || null);
43 });
44}
45
46export async function chatCacheWrite(record) {
47 const db = await openChatCacheDb();

Callers 1

restoreSessionCacheFunction · 0.90

Calls 1

openChatCacheDbFunction · 0.70

Tested by

no test coverage detected