Data Ingestion Strategies
Not all data shrinks and grows the same way. A homepage is one object that gets replaced. A pricing table is a short list fetched in full. A library of articles is unbounded and needs a ceiling. Flux asks you to name which shape a channel has once, up front, so caching and eviction behave correctly for that shape without any extra configuration later.
A cache that doesn't know whether it's holding one object or an open-ended collection has to guess — and guessing wrong either means throwing away data that should have stayed, or holding on to data that should have been evicted. ingestionType exists so nothing has to be guessed. You state up front which of four shapes a channel's data has, and Flux applies the right storage and freshness behavior for that shape automatically.
This is a one-time decision per channel, made once at register() time — not something you manage on every read or write afterward.
SNAPSHOT — a single object
COLLECTION_ALL — a bounded list, fetched whole
LRU instead.LRU — an unbounded collection, capped by budget
LRU caches each item individually and holds the collection to a byte budget rather than an item count, evicting the least recently accessed entries first once that budget is reached. A visitor's device never fills up just because they browsed a lot of articles.maxBytes is the field to set — it's a direct byte budget for the partition, not an approximation. If you only have an entry count in mind rather than a byte figure, maxEntries is accepted as a fallback and converted using a rough per-entry estimate, but that conversion exists purely for backward compatibility and isn't precise enough to plan storage around. If neither is set, Flux defaults to a 10MB budget, and whatever you configure is clipped to a 50MB ceiling regardless — mobile Safari in particular reclaims storage aggressively once an origin's usage spikes, so this ceiling exists to keep a misconfigured budget from becoming a real-device problem.
PAGINATED — large datasets with a virtual view window
PAGINATED is reserved as a fourth shape, built around a virtual view window rather than a full or per-item cache. This strategy is on the roadmap and not yet available — if your data currently needs this shape, LRU is the closest supported strategy in the meantime.ingestionType — a single channel doesn't mix shapes. If a screen needs both a bounded list and an unbounded detail view (a product grid and its individual product pages, say), that's two separate registrations: one COLLECTION_ALL channel for the grid, one LRU channel for the detail pages it links to.See ingestion/snapshot, ingestion/collection-all, ingestion/lru, and ingestion/paginated for a full field reference and worked example per strategy, and core-concepts/5-layer-stack for how the chosen strategy interacts with caching and eviction underneath.