global: fixes

This commit is contained in:
nym21
2026-05-03 12:44:18 +02:00
parent 9cb5f2c880
commit 4663d13194
46 changed files with 1058 additions and 544 deletions
@@ -496,7 +496,10 @@ class BrkClientBase {{
const value = await parse(res);
this._memSet(url, netEtag, value);
if (onValue) onValue(value);
if (cloned) _runIdle(() => browserCache.put(url, cloned));
if (cloned && browserCache) {{
const cache = browserCache;
_runIdle(() => cache.put(url, cloned));
}}
return value;
}} catch {{
return memHit.value;
@@ -527,7 +530,10 @@ class BrkClientBase {{
const value = await parse(res);
this._memSet(url, netEtag, value);
if (onValue) onValue(value);
if (cloned) _runIdle(() => browserCache.put(url, cloned));
if (cloned && browserCache) {{
const cache = browserCache;
_runIdle(() => cache.put(url, cloned));
}}
return value;
}} catch (e) {{
const stale = await stalePromise;