dataloader-cache-lru

JSON →
library 1.0.1 ·javascript maintenance
verified Jun 7, 2026

An LRU (least recently used) cache implementation compatible with Facebook's DataLoader. Version 1.0.1 is the current stable release; the package has not seen updates since 2017, reflecting a maintenance or deprecated state. It wraps the lru-cache module to provide bounded memory usage for DataLoader instances that persist across requests, such as in GraphQL contexts. Unlike the default Map cache, it evicts least recently used entries when the cache size limit is exceeded. Also supports clearing specific keys when records mutate. This package is specific to DataLoader and offers no alternative caching strategies.