From 1a99a9e99ba233c1144107cb3de32c8a5bd28073 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Sun, 11 Jan 2026 19:12:09 +0000 Subject: [PATCH] chore: enable nonBlocking secondary cache writes --- src/source/Source.ts | 1 + src/utils/height.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/source/Source.ts b/src/source/Source.ts index 3f5feec..a421293 100644 --- a/src/source/Source.ts +++ b/src/source/Source.ts @@ -25,6 +25,7 @@ export abstract class Source { public abstract readonly baseUrl: string; private static readonly sourceResultCache = new Cacheable({ + nonBlocking: true, primary: new Keyv({ store: new CacheableMemory({ lruSize: 1024 }) }), secondary: new Keyv(new KeyvSqlite(`sqlite://${getCacheDir()}/webstreamr-source-cache-v2.sqlite`)), stats: true, diff --git a/src/utils/height.ts b/src/utils/height.ts index 6c7a170..18f4251 100644 --- a/src/utils/height.ts +++ b/src/utils/height.ts @@ -6,6 +6,7 @@ import { getCacheDir } from './env'; import { CustomRequestConfig, Fetcher } from './Fetcher'; const playlistHeightCache = new Cacheable({ + nonBlocking: true, primary: new Keyv({ store: new CacheableMemory({ lruSize: 16384 }) }), secondary: new Keyv(new KeyvSqlite(`sqlite://${getCacheDir()}/webstreamr-playlist-height-cache.sqlite`)), });