chore: double HTTP cache, quadruple extractor cache
This commit is contained in:
parent
5316199b8c
commit
ef613f2742
2 changed files with 2 additions and 2 deletions
|
|
@ -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<UrlResult[]> {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export class Fetcher {
|
|||
|
||||
private readonly logger: winston.Logger;
|
||||
|
||||
private readonly httpCache = new LRUCache<string, Buffer>({ max: 1024 });
|
||||
private readonly httpCache = new LRUCache<string, Buffer>({ max: 2048 });
|
||||
private readonly rateLimitedCache = new TTLCache<string, undefined>({ max: 1024 });
|
||||
private readonly semaphores = new Map<string, SemaphoreInterface>();
|
||||
private readonly hostUserAgentMap = new Map<string, string>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue