Skip to content

Commit be91f2c

Browse files
committed
docs: fix noTTL description in keysByTTL() and sizeByTTL()
The noTTL property correctly identifies items where item.expiry === 0, not where cache ttl === 0. Updated documentation to reflect this.
1 parent 15b484f commit be91f2c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ console.log(cache.keysByTTL());
433433
**Returns:** `Object` - Object with three properties:
434434
- `valid` - Array of valid (non-expired) keys
435435
- `expired` - Array of expired keys
436-
- `noTTL` - Array of keys without TTL (when `ttl=0`)
436+
- `noTTL` - Array of keys without TTL (`expiry === 0`)
437437

438438
---
439439

@@ -544,7 +544,7 @@ console.log(cache.sizeByTTL());
544544
**Returns:** `Object` - Object with three properties:
545545
- `valid` - Number of items that haven't expired
546546
- `expired` - Number of expired items
547-
- `noTTL` - Number of items without TTL (when `ttl=0`)
547+
- `noTTL` - Number of items without TTL (`expiry === 0`)
548548

549549
**Note:** Items without TTL (expiry === 0) count as both valid and noTTL.
550550

0 commit comments

Comments
 (0)