Skip to content

Commit

Permalink
Merge pull request #556 from chris48s/clear-ttl0
Browse files Browse the repository at this point in the history
clear the cache on init if ttl is 0
  • Loading branch information
chris48s authored Jan 1, 2025
2 parents 334573c + 7e4e159 commit e3dd1b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e3dd1b3

Please sign in to comment.