MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / openCache

Function openCache

runtime/worker/engine.js:313–328  ·  view source on GitHub ↗
(integrity)

Source from the content-addressed store, hash-verified

311}
312
313async function openCache(integrity) {
314 if (!integrity) return new MemoryCache();
315 try {
316 const { IdbCache } = await import('../src/cache/idb.js');
317 const idb = new IdbCache();
318 await idb.open();
319 return idb;
320 } catch (e) {
321 console.warn(
322 '[edge-python] integrity:true requested but IndexedDB unavailable; '
323 + 'running with in-memory cache. Check worker.integrityActive to detect.',
324 e?.message ?? ''
325 );
326 return new MemoryCache();
327 }
328}

Callers 1

loadFunction · 0.85

Calls 1

openMethod · 0.95

Tested by

no test coverage detected