(integrity)
| 311 | } |
| 312 | |
| 313 | async 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 | } |