node-lru-cache is a high performance in memory caching library for Node.js that automatically evicts the least recently used items when the cache reaches its size limit. It is designed to provide predictable memory usage while maintaining fast lookup and update operations. The library is widely used in server side JavaScript applications where efficient caching can significantly improve performance. It offers flexible configuration options such as max size limits, time based expiration, and custom disposal logic. Developers can use it to cache expensive computations, API responses, or frequently accessed data. The implementation focuses on correctness, speed, and compatibility with modern Node.js environments. Overall, node-lru-cache provides a reliable building block for performance optimization in JavaScript backends.
Features
- Automatic least recently used eviction
- Configurable maximum cache size
- Time to live expiration support
- High performance JavaScript implementation
- Custom disposal and update hooks
- Works with modern Node.js environments