diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index 57edf53..5d506d1 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -61,13 +61,13 @@ export class Fetcher { private readonly logger: winston.Logger; private readonly dispatcher: Dispatcher | undefined; - private readonly httpCache = new TTLCache(); - private readonly rateLimitedCache = new TTLCache(); + private readonly httpCache = new TTLCache({ max: 1024 }); + private readonly rateLimitedCache = new TTLCache({ max: 1024 }); private readonly semaphores = new Map(); private readonly hostUserAgentMap = new Map(); private readonly cookieJar = new CookieJar(); - private readonly timeoutsCountCache = new TTLCache(); + private readonly timeoutsCountCache = new TTLCache({ max: 1024 }); private readonly timeoutsCountMutex = new Mutex(); public constructor(logger: winston.Logger) {