Interface PaginationCache<RT, E> sincev5.9.0
Defined in: warp-drive-packages/core/src/signals/pagination-cache.ts:61
Hideconstructor
The global, shared cache for a paginated collection. Keyed by the collection's first (or self) link, so that multiple components paging the same collection share loaded pages, the page graph, and totalPages.
This holds only shared, request-agnostic data. Per-component state (the active page, navigation) lives on PaginationState, which is the API consumers interact with — the cache itself is plumbing shared between the pagination classes.
Type Parameters
RT
RT = unknown
E
E = unknown
Properties
totalPages
totalPages: number;Defined in: warp-drive-packages/core/src/signals/pagination-cache.ts:79
The total number of pages in the collection, or 0 when unknown. Consumers should read this via PaginationState.totalPages.
data
Get Signature
get data(): Iterable<ContentItem<RT>>;Defined in: warp-drive-packages/core/src/signals/pagination-cache.ts:223
The items of every loaded page in the shared graph, flattened into one contiguous iterable in page order. Pages that are known but not loaded contribute nothing.
This is the whole-collection view. For the run a single component is viewing, use PaginationState.data.
Returns
Iterable<ContentItem<RT>>
pages
Get Signature
get pages(): Iterable<Readonly<PageCache<RT, E>>>;Defined in: warp-drive-packages/core/src/signals/pagination-cache.ts:200
Every page known to the shared graph, in order — loaded pages and pages known only from links — across all components sharing the collection.
This is the whole-collection view. For the run a single component is viewing, use PaginationState.pages.
const cache = getPaginationCache(firstLink);
for (const page of cache.pages) {
// page.isLoaded, page.pageNumber, page.data, ...
}