Cache invalidation and refresh
Provides methods to refresh visible blocks, purge the whole cache, or invalidate specific ranges or group paths. Scroll position and focus are kept. A refresh can show stale rows while it reloads (stale-while-revalidate) or show placeholders.
Planned. This page shows the specification from issue #180. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
The grid is scrolled to row 50,000, and a 'Server mutates prices' button is available.
Expected behavior
Under stale-while-revalidate, the old values stay visible with a subtle refreshing indicator, then changed cells flash. A purge clears all blocks but keeps the scroll index and refetches. Focus remains on the same row id.
Planned API surface
api.refreshRemote({ mode: 'visible'|'all'|'purge' })api.invalidateRange(start, end)api.invalidateGroup(groupPath)option: refreshDisplay: 'staleWhileRevalidate'|'placeholders'event: remoteRefreshedAcceptance criteria
- A 'visible' refresh refetches only blocks intersecting the viewport and marks the other blocks stale. (pending)
- Stale blocks are refetched when they next become visible. (pending)
- The scroll index is unchanged after any refresh mode. (pending)
- Refresh during in-flight requests cancels or supersedes them. (pending)