awesome-repositories.com
Blog
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
isaacs avatar

isaacs/node-lru-cache

0
View on GitHub↗
5,895 stars·371 forks·JavaScript·BlueOak-1.0.0·10 viewsisaacs.github.io/node-lru-cache↗

Node Lru Cache

node-lru-cache is a key-value store for Node.js that implements a memory-limited cache. It prevents memory exhaustion by capping the total number of items or total byte size, automatically evicting the least-recently-used items to maintain these limits.

The project provides specialized caching patterns, including time-to-live durations to ensure data freshness and a stale-while-revalidate mechanism that serves expired content while asynchronously fetching updates in the background. It also includes diagnostic tools for monitoring cache hits, misses, and eviction metrics through operational status objects and diagnostic channels.

The implementation covers broader memory management and data recovery capabilities, such as automatic data fetching for missing entries, manual pruning of outdated items, and the execution of cleanup functions when items expire to release external resources.

Features

  • Memory-Limited Caches - Implements a memory-limited key-value store that prevents exhaustion by capping item counts or total byte size.
  • LRU Cache Eviction - Implements a memory-limited cache that automatically evicts the least-recently-used items to prevent memory exhaustion.
  • Cache Eviction Policies - Implements size-based eviction algorithms to maintain memory limits by removing the oldest items.
  • Least Recently Used Caches - Prevents application crashes by capping memory usage through an automatic least-recently-used eviction policy.
  • Application Caching - Stores frequently accessed application data in memory to reduce latency and database load.
  • Hash Maps - Utilizes a hash map to provide constant-time retrieval of cached entries and their associated tracking nodes.
  • Linked-List LRU Evictions - Uses a doubly linked list to maintain access order for efficient least-recently-used item eviction.
  • Time-To-Live Expirations - Implements automatic data expiration based on configurable time-to-live durations.
  • Cache Memory Limits - Enforces memory constraints by blocking items that exceed a calculated size from entering the cache.
  • Resource Disposal - Provides mechanisms for disposing of resources and executing cleanup functions when items are removed.
  • Eviction Callbacks - Implements hooks that execute custom cleanup logic when cache entries are evicted or expire.
  • Resource Lifecycle Management - Ensures the release of external system resources through cleanup logic executed upon item expiration.
  • Cache Performance Monitoring - Tracks hit ratios, misses, and eviction metrics to analyze and optimize caching efficiency.
  • Diagnostic Channels - Provides internal event publishing via diagnostic channels for real-time observability of cache performance metrics.
  • Data Fetching - Automates data recovery by retrieving values through a specified method when a key is missing.
  • Stale-While-Revalidate - Supports the stale-while-revalidate pattern to serve expired content while asynchronously updating entries.
  • Caching - LRU cache implementation.

Star history

Star history chart for isaacs/node-lru-cacheStar history chart for isaacs/node-lru-cache

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Node Lru Cache

Similar open-source projects, ranked by how many features they share with Node Lru Cache.
  • tporadowski/redistporadowski avatar

    tporadowski/redis

    9,987View on GitHub↗

    Redis is a high-performance in-memory key-value store that functions as a distributed cache, message broker, and NoSQL database. It provides sub-millisecond read and write access to data stored in RAM and can operate as a vector database for indexing high-dimensional embeddings. The system supports a wide range of data storage and synchronization primitives, including the management of strings, hashes, lists, sets, and JSON documents. It enables real-time data operations through atomic transactions, hybrid persistence using snapshots and append-only logs, and high-availability configurations

    Credisredis-for-windowsredis-msi-installer
    View on GitHub↗9,987
  • hashicorp/golang-lruhashicorp avatar

    hashicorp/golang-lru

    5,091View on GitHub↗

    This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when capacity is reached. It provides a fixed-size memory cache designed to maintain a constant memory footprint by removing the oldest entries as new data arrives. The system includes an eviction manager that executes custom callbacks when entries are purged to facilitate resource cleanup. It also supports time-based expiration, allowing for the automatic removal of items after a specified time-to-live duration. The library covers general caching capabilities including cache inspecti

    Go
    View on GitHub↗5,091
  • coocood/freecachecoocood avatar

    coocood/freecache

    5,399View on GitHub↗

    freecache is a high-performance, concurrent in-memory key-value store library for Go applications. It functions as a fixed-size cache that manages large volumes of data while eliminating garbage collection overhead through the use of preallocated memory and off-heap storage. The system maintains a predictable memory footprint by utilizing fixed memory allocation and circular buffer management, where new entries automatically overwrite the oldest data upon reaching capacity. It further reduces contention between simultaneous readers and writers through lock-striped concurrent access. The libr

    Go
    View on GitHub↗5,399
  • memcached/memcachedmemcached avatar

    memcached/memcached

    14,132View on GitHub↗

    Memcached is a high-performance, distributed, in-memory key-value storage and request routing engine. It functions as a volatile data store designed to accelerate dynamic applications by caching objects in RAM, thereby reducing backend database load and providing sub-millisecond response times. The system utilizes a specialized architecture that organizes memory into fixed-size slabs to minimize fragmentation and maximize throughput for high-concurrency workloads. The project distinguishes itself through a multi-threaded, lock-friendly design that scales across CPU cores and supports complex

    C
    View on GitHub↗14,132
See all 30 alternatives to Node Lru Cache→

Frequently asked questions

What does isaacs/node-lru-cache do?

node-lru-cache is a key-value store for Node.js that implements a memory-limited cache. It prevents memory exhaustion by capping the total number of items or total byte size, automatically evicting the least-recently-used items to maintain these limits.

What are the main features of isaacs/node-lru-cache?

The main features of isaacs/node-lru-cache are: Memory-Limited Caches, LRU Cache Eviction, Cache Eviction Policies, Least Recently Used Caches, Application Caching, Hash Maps, Linked-List LRU Evictions, Time-To-Live Expirations.

What are some open-source alternatives to isaacs/node-lru-cache?

Open-source alternatives to isaacs/node-lru-cache include: tporadowski/redis — Redis is a high-performance in-memory key-value store that functions as a distributed cache, message broker, and NoSQL… hashicorp/golang-lru — This is a thread-safe in-memory cache library for Go that automatically evicts the least recently used items when… coocood/freecache — freecache is a high-performance, concurrent in-memory key-value store library for Go applications. It functions as a… memcached/memcached — Memcached is a high-performance, distributed, in-memory key-value storage and request routing engine. It functions as… lmcache/lmcache — LMCache is a distributed key-value cache manager and tiering system designed to accelerate large language model… olric-data/olric — Olric is a distributed data grid and in-memory key-value store that partitions and replicates data across a cluster of…