{"library":"memory-cache-ttl","type":"library","category":null,"description":"A simple, performant in-memory cache with configurable Time To Live (TTL) for Node.js. Current stable version is 1.0.52. It provides global and per-key TTL, automatic expiry cleanup via configurable interval, optional TTL randomization, extend-on-hit behavior, and an async onInterval callback to refresh cache entries. The package has zero dependencies and uses CommonJS. It is lightweight and minimal compared to more feature-rich caches like node-cache or lru-cache.","language":"javascript","status":"active","version":"1.0.52","tags":["javascript","cache","simple","ttl","memory"],"last_verified":"Sun Jun 07","install":[{"cmd":"npm install memory-cache-ttl","imports":["const cache = require('memory-cache-ttl');","cache.init({ ttl: 5 });","cache.set('key', 'value', 10);","cache.init({ onInterval: (id) => fetchNewValue(id) });"]},{"cmd":"yarn add memory-cache-ttl","imports":[]},{"cmd":"pnpm add memory-cache-ttl","imports":[]}],"homepage":"https://github.com/tiborv/memory-cache-ttl#readme","github":"ssh://git@github.com/tiborv/memory-cache-ttl","docs":null,"changelog":null,"pypi":null,"npm":"memory-cache-ttl","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}