From 7e4e159089fdaeb99f4ee247d63261a428005244 Mon Sep 17 00:00:00 2001 From: chris48s Date: Wed, 1 Jan 2025 19:40:09 +0000 Subject: [PATCH] clear the cache on init if ttl is 0 --- src/cache.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cache.js b/src/cache.js index 3fe6ad3..ba4411f 100644 --- a/src/cache.js +++ b/src/cache.js @@ -8,6 +8,9 @@ class Cache { this.ttl = this.cache._cache.ttl || 0; this.callCounter = {}; this.callLimit = 10; + if (this.ttl === 0) { + this.cache.clear(); + } } limitDepth(url) {