Skip to content

Documentation

ziflux adds stale-while-revalidate caching to Angular resource(). Start with one cached resource, then add cache invalidation and mutations only where the UI needs them.

Install ziflux, configure the cache lifetimes, and create your first cachedResource().

Structure a domain, handle stale errors, run mutations, and implement optimistic updates.

Understand fresh, stale, and evicted entries, hierarchical keys, and when caching pays off.

Apply SWR caching to route tabs, list/detail navigation, and dependent form data.

Choose between the recommended API + Store + Component structure and a leaner factory service.

Test stores and standalone DataCache instances inside Angular’s injection context.

Browse every runtime export, signature, option, signal, and usage example.

Avoid invalidation, optimistic update, and untyped cache-key pitfalls.