DatagridCacheManager
Defined in: core/managers/cache-manager.svelte.ts:11
Manages cache for a datagrid, including sorted, filtered, and grouped rows. Provides methods to invalidate and update caches when data changes.
Type Parameters
• TOriginalRow
The type of the original row data.
Constructors
new DatagridCacheManager()
new DatagridCacheManager<
TOriginalRow
>(datagrid
):DatagridCacheManager
<TOriginalRow
>
Defined in: core/managers/cache-manager.svelte.ts:95
Creates an instance of DatagridCacheManager for a specific datagrid.
Parameters
datagrid
DatagridCore
<TOriginalRow
>
The core datagrid instance.
Returns
DatagridCacheManager
<TOriginalRow
>
Properties
Property | Type | Description | Defined in |
---|---|---|---|
datagrid | DatagridCore <TOriginalRow > | The core datagrid instance that the cache manager is associated with. | core/managers/cache-manager.svelte.ts:16 |
filteredData | TOriginalRow [] | Cached filtered data. Null if the cache is invalid. | core/managers/cache-manager.svelte.ts:28 |
hierarchicalRows | GridRow <TOriginalRow >[] | Rows with hierarchical structure, present only when grouping is enabled. Null if the cache is invalid. | core/managers/cache-manager.svelte.ts:48 |
paginatedRows | GridRow <TOriginalRow >[] | Cached paginated rows. Null if the cache is invalid. | core/managers/cache-manager.svelte.ts:34 |
rows | GridRow <TOriginalRow >[] | Either grouped rows that are flattened or basic rows when there is no grouping. Null if the cache is invalid. | core/managers/cache-manager.svelte.ts:41 |
sortedData | TOriginalRow [] | Cached sorted data. Null if the cache is invalid. | core/managers/cache-manager.svelte.ts:22 |
Methods
invalidate()
invalidate(
target
):void
Defined in: core/managers/cache-manager.svelte.ts:60
Invalidates the specified data in the cache.
Parameters
target
The type of cache to invalidate. Options are: - ‘everything’ to invalidate all caches. - ‘sortedData’ to invalidate the sorted data cache. - ‘filteredData’ to invalidate the filtered data cache. - ‘hierarchicalRows’ to invalidate the hierarchical rows cache. - ‘rows’ to invalidate the basic rows cache. - ‘paginatedRows’ to invalidate the paginated rows cache.
"filteredData"
| "everything"
| "sortedData"
| "hierarchicalRows"
| "rows"
| "paginatedRows"
Returns
void
invalidateGroupedRowsCache()
invalidateGroupedRowsCache():
void
Defined in: core/managers/cache-manager.svelte.ts:86
Clears the flattened views of the grouped rows while keeping the hierarchical structure intact.
Returns
void