chore: enable nonBlocking secondary cache writes

This commit is contained in:
WebStreamr 2026-01-11 19:12:09 +00:00
parent f49769f3c4
commit 1a99a9e99b
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -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,

View file

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