Skip to content

Commit 03c497c

Browse files
ronagmcollina
andauthored
cache: don't check size if not necessary (#4140)
* cache: don't check size if not necessary * Update lib/cache/sqlite-cache-store.js --------- Co-authored-by: Matteo Collina <[email protected]>
1 parent d2be897 commit 03c497c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cache/sqlite-cache-store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ module.exports = class SqliteCacheStore {
350350
}
351351

352352
#prune () {
353-
if (this.size <= this.#maxCount) {
353+
if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) {
354354
return 0
355355
}
356356

0 commit comments

Comments
 (0)