Releases: jaredwray/cacheable
2026-05-27
Releasing 8 packages: @cacheable/memory@2.1.0 (minor), @cacheable/node-cache@3.1.0 (minor), cacheable@2.4.0 (minor), cache-manager@7.2.9 (patch), file-entry-cache@11.1.4 (patch), flat-cache@6.1.23 (patch), @cacheable/net@2.0.9 (patch), @cacheable/utils@2.4.2 (patch).
@cacheable/memory@2.1.0 — 2026-05-27
Add lifecycle hooks and maxTtl cap to CacheableMemory.
Features
-
add hooks for all cache operations via
CacheableMemoryHooksenum (1ff149d, #1644)import { CacheableMemory, CacheableMemoryHooks } from '@cacheable/memory'; const cache = new CacheableMemory(); cache.onHookSync(CacheableMemoryHooks.BEFORE_SET, (data) => { data.value = transform(data.value); // mutate before write }); cache.set('key', 'value');
-
add
maxTtloption to cap maximum time-to-live (948234a, #1645)const cache = new CacheableMemory({ ttl: '10m', maxTtl: '1h' }); cache.set('key', 'value', '2h'); // capped to 1h cache.set('key2', 'value2'); // no TTL → capped to 1h
Internal
Contributors
- @jaredwray (3)
Full List of Changes
- feat(cacheable, memory): add maxTtl option to cap maximum time-to-live by @jaredwray in #1645
- feat(@cacheable/memory): add hooks like cacheable by @jaredwray in #1644
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
Full diff: 9346f94...release/2026-05-27-8-packages
@cacheable/node-cache@3.1.0 — 2026-05-27
Add keys/has/getTtl/flushAll, events, useClones, checkperiod, and fix multiple stat-tracking bugs.
Features
-
add
keys()andhas()methods for cache inspection (bf3ea48, #1643)const store = new NodeCacheStore(); await store.set('a', 1); await store.keys(); // ['a'] await store.has('a'); // true
-
add
getTtl()to inspect key expiration timestamps (bf3ea48, #1643)await store.set('key', 'val', 5000); const ttl = await store.getTtl('key'); // ms timestamp when key expires
-
add
flushAll()to clear data and reset all stats (bf3ea48, #1643)await store.flushAll(); // clears data + resets stats, emits "flush"
-
add event emitters for
set,del,expired, andflushoperations (bf3ea48, #1643)store.on('set', (key, value, ttl) => { /* ... */ }); store.on('del', (key, value) => { /* ... */ }); store.on('expired', (key, value) => { /* ... */ }); store.on('flush', () => { /* ... */ });
-
add
useClonesoption for deep-cloning via structuredClone (bf3ea48, #1643)const store = new NodeCacheStore({ useClones: true });
-
add
checkperiodoption for interval-based expired item detection (bf3ea48, #1643)const store = new NodeCacheStore({ checkperiod: 60 }); // check every 60s store.close(); // stop interval
-
add
deleteOnExpireoption andclose()/getIntervalId()lifecycle methods (bf3ea48, #1643)
Bug Fixes
- fix
setTtl()treating falsy cached values (0, "", false, null) as non-existent (bf3ea48, #1643) - fix
mdel()firing stats and events for non-existent keys (bf3ea48, #1643) - fix
startInterval()leaking old timer when called twice (bf3ea48, #1643) - fix
set()double-counting stats on key overwrites (bf3ea48, #1643) - fix
checkData()swallowing unhandled promise rejections (bf3ea48, #1643) - fix
handleExpired()stats underflow when Keyv auto-expires items (bf3ea48, #1643) - fix
checkData()mutating Map during iteration (bf3ea48, #1643)
Internal
- migrate build from tsup to tsdown, pnpm 11 (1508695, #1642)
- move store tests to use @faker-js/faker (d51b5f2, #1641)
Contributors
- @jaredwray (3)
Full List of Changes
- feat(@cacheable/node-cache): enhance NodeCacheStore with missing features by @jaredwray in #1643
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
- @cacheable/node-cache: move store tests to use @faker-js/faker by @jaredwray in #1641
Full diff: 9346f94...release/2026-05-27-8-packages
cacheable@2.4.0 — 2026-05-27
Add maxTtl option to enforce an upper bound on cache entry lifetimes.
Features
-
add
maxTtloption to cap maximum time-to-live onset()andsetMany()(948234a, #1645)import { Cacheable } from 'cacheable'; const cache = new Cacheable({ ttl: '10m', maxTtl: '1h' }); await cache.set('key', 'value', '2h'); // capped to 1h await cache.set('key2', 'value2'); // no TTL → capped to 1h
Internal
Contributors
- @jaredwray (2)
Full List of Changes
- feat(cacheable, memory): add maxTtl option to cap maximum time-to-live by @jaredwray in #1645
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
Full diff: 9346f94...release/2026-05-27-8-packages
cache-manager@7.2.9 — 2026-05-27
Build tooling migration to tsdown and pnpm 11.
Internal
Contributors
- @jaredwray (1)
Full List of Changes
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
Full diff: 9346f94...release/2026-05-27-8-packages
file-entry-cache@11.1.4 — 2026-05-27
Build tooling migration to tsdown and pnpm 11.
Internal
Contributors
- @jaredwray (1)
Full List of Changes
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
Full diff: 9346f94...release/2026-05-27-8-packages
flat-cache@6.1.23 — 2026-05-27
Build tooling migration to tsdown and pnpm 11.
Internal
Contributors
- @jaredwray (1)
Full List of Changes
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
Full diff: 9346f94...release/2026-05-27-8-packages
@cacheable/net@2.0.9 — 2026-05-27
Build tooling migration to tsdown and pnpm 11.
Internal
Contributors
- @jaredwray (1)
Full List of Changes
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
Full diff: 9346f94...release/2026-05-27-8-packages
@cacheable/utils@2.4.2 — 2026-05-27
Build tooling migration to tsdown and pnpm 11.
Internal
Contributors
- @jaredwray (1)
Full List of Changes
- feat: Migrate to pnpm 11 with corepack and tsdown from tsup by @jaredwray in #1642
Full diff: 9346f94...release/2026-05-27-8-packages
2026-05-16
@cacheable/net@2.0.8
Fix FormData/Blob/URLSearchParams bodies by routing through the runtime's own fetch so the body classes share a realm with the fetch implementation.
Bug Fixes
- send FormData/Blob correctly using the runtime's own fetch (
7cbe243, #1636)
Contributors
- @jaredwray (1)
@cacheable/memory@2.0.9
Clarify in the README that lruSize=0 disables LRU.
Documentation
- clarify that lruSize=0 disables LRU (
2abfb68, #1638)
Contributors
- @jaredwray (1)
Full diff: 2026-05-07...2026-05-16
2026-05-07
What's Changed
-
node-cache - fix: prototype pollution vulnerability in mget methods by @jaredwray in #1613
-
node-cache - fix: has was not removing expired keys by @jaredwray in #1618
-
cacheable - fix: ttl in documentation and cascading ttl in set and setMany by @jaredwray in #1620
-
cacheable - fix: upgrade lru-cache to 11.3.6 by @jaredwray in #1625
-
cacheable - fix: upgrade qified pair to 0.10.1 by @jaredwray in #1631
-
cacheable-request - fix: upgrade @keyv/sqlite to 4.0.8 by @jaredwray in #1626
-
cacheable-request - chore: upgrading sqlite3 to latest by @jaredwray in #1634
-
file-entry-cache - fix: upgrade pino to 10.3.1 by @jaredwray in #1627
-
@cacheable/benchmark - fix: upgrade tsx to 4.21.0 by @jaredwray in #1628
-
@cacheable/benchmark - fix: upgrade @faker-js/faker to 10.4.0 (breaking) by @jaredwray in #1632
-
@cacheable/benchmark - fix: upgrade misc dependencies by @jaredwray in #1630
-
benchmark - chore: upgrading tinybench and cleanup by @jaredwray in #1635
-
mono - fix: upgrade vitest cluster to 4.1.5 by @jaredwray in #1621
-
mono - fix: upgrade @biomejs/biome to 2.4.14 by @jaredwray in #1622
-
mono - fix: upgrade @types/node to 24.12.2 by @jaredwray in #1623
-
mono - fix: upgrade wrangler to 4.87.0 by @jaredwray in #1624
-
mono - upgrading vitest, faker, biome, and types by @jaredwray in #1614
-
mono - chore: upgrading wrangler to 4.81.0 by @jaredwray in #1615
-
website - chore: upgrading docula to 1.12.0 by @jaredwray in #1616
-
@cacheable/website - fix: upgrade docula to 1.14.0 by @jaredwray in #1629
Full Changelog: 2026-03-26...2026-05-07
2026-03-26
What's Changed
- mono - chore: moving to prepublishOnly by @jaredwray in #1599
- cacheable-request - chore: fixing tests with parse deprecation by @jaredwray in #1600
- node-cache - fix: generic type propagation in get, mget, and take methods by @jaredwray in #1602
- node-cache - fix: (breaking) Remove maxKeys limit feature from NodeCacheStore by @jaredwray in #1605
- node-cache - chore: (breaking) upgrading hookified adding stats by @jaredwray in #1609
- flat-cache - fix: Upgrade flatted to ^3.4.2 to fix GHSA-rf6f-7fwh-wjgh by @jaredwray in #1606
- utils - chore: upgrading hashery by @jaredwray in #1607
- net - chore: upgrading undici by @jaredwray in #1608
Full Changelog: 2026-03-17...2026-03-26
2026-03-17
What's Changed
- flat-cache - chore: bump
flattedversion fromv3.3.3->v3.4.1by @brionmario in #1594 - net - fix: port issue with local mockhttp by @jaredwray in #1595
- chore: moving core dev dependencies to mono hoist by @jaredwray in #1596
- cacheable - chore: upgrading qified to latest by @jaredwray in #1597
- cacheable - chore: upgrading lru-cache and @keyv/redis by @jaredwray in #1598
New Contributors
- @brionmario made their first contribution in #1594
Full Changelog: 2026-02-27...2026-03-17
2026-02-27
What's Changed
- utils -Add nonBlocking option support to getOrSet method by @jaredwray in #1580
- utils - chore: upgrading faker-js and types to latest by @jaredwray in #1581
- utils - chore: upgrading hashery to 1.5.0 by @jaredwray in #1583
- memory - chore: upgrading faker, rimraf, and types to latest by @jaredwray in #1584
- memory - chore: upgrading hookified to 1.15.1 by @jaredwray in #1585
- mono - chore: upgrading biome and wrangler to latest by @jaredwray in #1586
- net - chore: upgrading types, rimraf, and faker to latest by @jaredwray in #1587
- net - chore: upgrading hookified to 1.15.1 by @jaredwray in #1588
- net - chore: upgrading undici to 7.22.0 by @jaredwray in #1589
- mono - chore: moving to nodejs 24 by @jaredwray in #1590
- node-cache - fix: ttl was not defaulting to 0 by @jaredwray in #1591
- mono - fix: updating codecov badge by @jaredwray in #1592
Full Changelog: 2026-02-06...2026-02-27
2026-02-06
What's Changed
- utils - chore: upgrading vitest to 4.0.18 by @jaredwray in #1555
- utils - chore: upgrading keyv to 5.6.0 by @jaredwray in #1556
- cache-manager - chore: upgrading keyv to 5.6.0 by @jaredwray in #1557
- cacheable - chore: upgrading keyv to 5.6.0 by @jaredwray in #1558
- cacheable-request - chore: upgrading keyv to 5.6.0 by @jaredwray in #1559
- memory - chore: upgrading keyv to 5.6.0 by @jaredwray in #1560
- node-cache - chore: upgrading keyv to 5.6.0 by @jaredwray in #1561
- utils - fix: adding index.ts filter for coverage by @jaredwray in #1562
- memory - chore: upgrading vitest to 4.0.18 by @jaredwray in #1563
- memory - chore: upgraind @keyv/bigmap to 1.3.1 by @jaredwray in #1564
- memory - chore: upgrading hookified to 1.15.0 by @jaredwray in #1565
- net - chore: upgrading vitest to 4.0.18 by @jaredwray in #1566
- net - chore: upgrading undici to 7.19.1 by @jaredwray in #1567
- net - chore: upgrading hookified to 1.15.0 by @jaredwray in #1568
- utils - fix: Improve error handling for getOrSet by @nrutman in #1553
- memory - fix: memory leak when using lru not removing key by @jaredwray in #1571
- mono - feat: adding in Agents by @jaredwray in #1572
- cache-manager - chore: upgrading @keyv/redis to 5.1.6 by @jaredwray in #1573
- mono - chore: centralizing dev dependencies to mono by @jaredwray in #1574
- cacheable-request - chore: upgrading tsup to 8.5.1 by @jaredwray in #1575
- website - chore: upgrading docula to 0.40.0 by @jaredwray in #1576
- chore: upgrading @biomejs/biome to 2.3.14 by @jaredwray in #1577
- mono - chore: upgrading wrangler to 4.62.0 by @jaredwray in #1578
New Contributors
Full Changelog: 2025-01-17...2026-02-06
2025-01-17
What's Changed
- cacheable - chore: upgrading vitest to 4.0.17 by @jaredwray in #1542
- cacheable - chore: upgrading qified to 0.6.0 by @jaredwray in #1543
- cacheable - chore: upgrading hookified to 1.15.0 by @jaredwray in #1544
- node-cache - chore: upgrading vitest to 4.0.17 by @jaredwray in #1545
- node-cache - chore: upgrading hookified to 1.15.0 by @jaredwray in #1546
- node-cache - doc: adding in breaking changes from v1 to v2 by @jaredwray in #1547
- flat-cache - chore: upgrading vitest to 4.0.17 by @jaredwray in #1548
- flat-cache - chore: upgrading hookified to 1.15.0 by @jaredwray in #1549
- file-entry-cache - chore: upgrading vitest to 4.0.17 by @jaredwray in #1550
- file-entry-cache - chore: upgrading pino to 10.1.1 by @jaredwray in #1551
Full Changelog: 2026-01-09...2025-01-17
2026-01-09
What's Changed
- node-cache - feat: (breaking) moving to Keyv as the storage by @jaredwray in #1524
- cache-manager - chore: upgrading vitest to 4.0.16 by @jaredwray in #1532
- cache-manager - chore: upgrading @biomejs/biome to 2.3.11 by @jaredwray in #1533
- cacheable-request - chore: upgrading vitest to 4.0.16 by @jaredwray in #1534
- cacheable-request - chore: upgrading normalize-url to 8.1.1 by @jaredwray in #1535
- cacheable-request - chore: upgrading body-parser to 2.2.2 by @jaredwray in #1536
- website - chore: upgrading docula to 0.31.2 by @jaredwray in #1537
- mono - chore: upgrading vitest to 4.0.16 by @jaredwray in #1538
- mono - chore: upgrading @biomejs/biome to 2.3.11 by @jaredwray in #1539
- mono - chore: upgrading wrangler to 4.57.0 by @jaredwray in #1540
Full Changelog: 2025-12-26...2026-01-09
2025-12-26
What's Changed
- cache-manager - chore: upgrading keyv to 5.5.5 by @jaredwray in #1510
- utils - chore: upgrading vitest to 4.0.16 by @jaredwray in #1513
- utils - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in #1514
- utils - chore: upgrading lru-cache to 11.2.4 by @jaredwray in #1515
- utils - chore: upgrading hashery to 1.3.0 by @jaredwray in #1516
- memory - chore: upgrading vitest to 4.0.16 by @jaredwray in #1517
- memory - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in #1518
- memory - chore: upgrading hookified to 1.14.0 by @jaredwray in #1519
- net - chore: upgrading vitest to 4.0.16 by @jaredwray in #1520
- net - chore: upgrading @biomejs/biome to 2.3.10 by @jaredwray in #1521
- net - chore: upgrading hookified to 1.14.0 by @jaredwray in #1522
Full Changelog: 2025-12-16...2025-12-26