levelup-cache

JSON →
library 2.3.0 ·javascript
verified Jun 7, 2026

Cache remote data in a LevelUP database with automatic refresh and TTL. Version 2.3.0 is the current stable release. Key features: returns cached value immediately regardless of age, automatically calls the getter periodically to check for new values, emits events when changes are detected, and drops items after a configurable TTL since last access. Unlike level-ttl-cache, this library refreshes values even if the key is not accessed, and emits change events. Breaking change in 2.0.0: switched from sublevel to subleveldown. Maintained by TehShrike, low activity.