Appolo Cache is an in-memory LRU cache for Node.js written in TypeScript. The current stable version is 8.0.0. It provides a simple API for caching key-value pairs with optional per-item TTL and automatic eviction of least recently used items when the maximum cache size is reached. Key differentiators include typed generics, built-in maxAge support, and utility methods like peek, pop, and prune. It is lightweight, dependency-free, and well-suited for server-side caching needs.
npm install appolo-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic CRUD operations: creating a Cache with maxSize and maxAge, setting and getting values, checking size, and resetting.
Always pass options object if you need to customize maxSize or maxAge: new Cache<K,V>({ maxSize: 100 })Use has() before get() if you need to distinguish between missing and null values, or check for null explicitly.
Set maxAge in constructor or pass it explicitly in set() to control per-item expiration.
const { Cache } = require('appolo-cache');Run 'npm install appolo-cache' and ensure no typos in import statement.
No dependency data recorded yet.