fix: address CodeRabbit review — stream tee, cache guard, base64, layout fallback
- BoardLayoutFallback: use HomarrLogoWithTitle (no board context required) - integration-data-cache: guard cache.set with placeholder identity to prevent stale write-back after invalidation + test - next-cache-handler: memoize the promise (not resolved handler) to prevent concurrent Redis connections - redis-handler: tee ReadableStream before consuming in set(), hand fresh branch to each get() caller - redis-handler: base64-encode body instead of number[] (3-4x smaller)
This commit is contained in:
5 files changed
+58
-25
No files matched your search
@@ -56,8 +56,10 @@ export const getCachedIntegrationData = async <T>(
|
||||
|
||||
const pending = fetcher()
|
||||
.then((data) => {
|
||||
cache.set(key, { data, timestamp: Date.now() });
|
||||
evictOldestEntry();
|
||||
if (cache.get(key) === placeholder) {
|
||||
cache.set(key, { data, timestamp: Date.now() });
|
||||
evictOldestEntry();
|
||||
}
|
||||
return data;
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in new issue
Block a user