From ef613f274247efc382e50475765172c7216a48e5 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Sat, 16 Aug 2025 16:40:15 +0000 Subject: [PATCH] chore: double HTTP cache, quadruple extractor cache --- src/extractor/ExtractorRegistry.ts | 2 +- src/utils/Fetcher.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extractor/ExtractorRegistry.ts b/src/extractor/ExtractorRegistry.ts index ca92acf..001cfe5 100644 --- a/src/extractor/ExtractorRegistry.ts +++ b/src/extractor/ExtractorRegistry.ts @@ -12,7 +12,7 @@ export class ExtractorRegistry { public constructor(logger: winston.Logger, extractors: Extractor[]) { this.logger = logger; this.extractors = extractors; - this.urlResultCache = new TTLCache({ max: 1024 }); + this.urlResultCache = new TTLCache({ max: 4096 }); } public async handle(ctx: Context, url: URL, countryCode: CountryCode, title?: string | undefined): Promise { diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index 4c3c905..96d57f8 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -64,7 +64,7 @@ export class Fetcher { private readonly logger: winston.Logger; - private readonly httpCache = new LRUCache({ max: 1024 }); + private readonly httpCache = new LRUCache({ max: 2048 }); private readonly rateLimitedCache = new TTLCache({ max: 1024 }); private readonly semaphores = new Map(); private readonly hostUserAgentMap = new Map();