(cacheKey)
| 54 | } |
| 55 | |
| 56 | export async function chatCacheDelete(cacheKey) { |
| 57 | const db = await openChatCacheDb(); |
| 58 | return new Promise((resolve, reject) => { |
| 59 | const tx = db.transaction(CHAT_CACHE_STORE, 'readwrite'); |
| 60 | tx.oncomplete = () => resolve(); |
| 61 | tx.onerror = () => reject(tx.error || new Error('Failed to delete chat cache')); |
| 62 | tx.objectStore(CHAT_CACHE_STORE).delete(cacheKey); |
| 63 | }); |
| 64 | } |
| 65 | |
| 66 | export async function chatCacheReadAll() { |
| 67 | const db = await openChatCacheDb(); |
no test coverage detected