Skip to main content

ng-ncached

A simple multi-layer cache service for Angular

Easy to Use

Hierarchical, with TTL

Organise cache data into namespaces of any depth. Pass { ttl: ms } to set() and entries expire automatically — no background timer.

Focus on What Matters

Observables, deduplicated

cacheObservable() wraps any HTTP call, caches the result, and shares one subscription across N concurrent callers via shareReplay. Built-in fallback on error.

Powered by React

Persistence with compression

Opt in to localStorage persistence with one provider call. Plug in LzStringCompressor to halve your snapshot size, or ship your own ICompressor.