🙋 SDK Version
Latest main (@flowgram.ai/utils)
📌 Layout
All layouts (Core Utility / Reactive Cache)
💻 Environment
- Operation System: All (Cross-platform)
- Node.js: 18 / 20 LTS
📝 Description
In @flowgram.ai/utils (packages/common/utils/src/cache.ts), createShortCache uses if (cache) to determine cache validity:
if (cache) {
updateTimeout();
return cache;
}
When a cached value is falsy (e.g. false, 0, "", null), if (cache) evaluates to false, causing the cache to be bypassed on every subsequent get() invocation and executing the compute function repeatedly.
In addition, ShortCache lacks a dispose() / clear() method to clean up active setTimeout timers on teardown.
I have a verified minimal fix with regression tests ready to submit.
🙋 SDK Version
Latest main (
@flowgram.ai/utils)📌 Layout
All layouts (Core Utility / Reactive Cache)
💻 Environment
📝 Description
In
@flowgram.ai/utils(packages/common/utils/src/cache.ts),createShortCacheusesif (cache)to determine cache validity:When a cached value is falsy (e.g.
false,0,"",null),if (cache)evaluates tofalse, causing the cache to be bypassed on every subsequentget()invocation and executing the compute function repeatedly.In addition,
ShortCachelacks adispose()/clear()method to clean up activesetTimeouttimers on teardown.I have a verified minimal fix with regression tests ready to submit.