Egg.js plugin wrapping lru-cache to provide LRU caching in Egg applications. Version 1.0.1 (latest) supports both single and multi-client configurations. It integrates seamlessly with Egg's plugin system and offers simple key-value cache with optional time-to-live. Alternative to egg-redis for in-memory caching with LRU eviction policy.
npm install egg-lruNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
How to enable, configure, and use egg-lru plugin in an Egg.js application.
Ensure plugin is enabled and accessed only after application start.
Check if client exists before calling methods.
Check lru-cache changelog and update configuration accordingly.
Ensure plugin is enabled in config/plugin.js and correctly configured.
For single client, use app.lru directly. For multi, use app.lru.get('clientName') first.