node-internal-cache
Simple and fast NodeJS internal caching

A simple caching module that has set, get and delete methods and works a little bit like memcached.

node-internal-cache logonode-internal-cache logo
🔄

Simple API

Clean set, get, and delete methods with optional TTL. Works like memcached, but entirely in-memory.

⏱️

TTL & Auto Expiry

Keys automatically expire after a configurable TTL. Built-in periodic check cleans expired entries.

📦

Clone or Reference

Choose between cloning values for safety or storing references for performance.

📊

Statistics

Built-in tracking of keys, hits, misses, and approximate size in bytes.

🔔

Event System

Listen for set, del, expired, flush, and flush_stats events to react to cache changes.

🚀

High Performance

All keys stored in a single object for instant O(1) lookups. Practical limit of ~1M keys.