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`)), });