(update)
| 80 | } |
| 81 | |
| 82 | export async function updateCachedRecords(update) { |
| 83 | const records = await readFreshCachedRecords(); |
| 84 | if (!records) { |
| 85 | return; |
| 86 | } |
| 87 | await setRecords(update(records)); |
| 88 | } |
| 89 | |
| 90 | async function readFreshCachedRecords() { |
| 91 | const entry = await readCacheEntry(RECORDS_CACHE_KEY, {legacyFields: ["data"]}); |
no test coverage detected