This package is the code support for book "Node Reliable Caching"
npm install reliable-caching
This package provides functionality for cache key generation, URL signing for cache poisoning prevention, cache signing, singleflight pattern to prevent resource stampede (single instance and distributed) and also cache benchmarking (single instance and distributed).
These ideas are being compiled into a book focused mainly on reliable caching for node.
- Installation
- Documentation
- Key Generation
- URL Signing
- Reliable Cache Implementations
- In Memory LRU
- Redis
- Memcache
- Cache Signing
- Cache Benchmarking (single instance)
- Cache Benchmarking (distributed)
- Race Prevention (single instance)
- Articles
Using npm:npm i --save reliable-caching
All implementations below handle things like immutability of cache objects (important to not alter cache content), handle deserialization errors (handled as a miss), and signature failures (handled as a miss), making code more robust than those quickly made hacks developers do.
- In Memory LRU provides object immutability, no cache signature
- Redis provides object immutability, cache signature
- Memcache provides object immutability, cache signature
- Drop hit ratio as cache measure, now!
- Resource optimization in Node.js