You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have started to Add editable components to our Virtual Table, and have run in to some complexities around cache invalidation.
We are using Redux for state management, and have reducers that present the most recent page loaded and the skip value. As the user scrolls we notice that
Set up
Given:
a). The redux state does contains the most recent loaded data (e.g. based on time(n))
b). The Virtual table 'rows' prop mirrors the redux state
c). The virtual table also displays older data around that page (e.g. based on time(n-1), time(n-2). The components and model for these rows are held in a cache.
d). The cache elements are now disconnected from the redux state
When:
a) We edit a value in a cell component in page from (time(n-1) or time(n-2)
b) Save that change via a Redux command
Then
a) The the remote update will occur, and dispatch into Redux
b) The the update to the cached entry is no longer in Redux state, so the update will be a noop.
c) The user does not see their change reflected in the visible component.
The desired behaviour is that update consistency from Redux is maintained for cached rows.
Things we've tried:
Returning all possible rows loaded to the 'rows' prop. => A repeating eternally growing paged list, and update inconsistencies.
Using the Editable Table plug in, hoping that it would force a round trip for cached entries =>
It does not force a cache invalidation
Create a custom cache and inject it into VirtualTableState => There are no obvious hooks to do this
Things we're going to try:
Overriding the VirtualTableState and hooking into to how the VirtualRows are managed
Binding an Action that can be invoked to rebind cached entries when Editing is required
Things we could use if they were available:
Any of:
a) Control over cache entry invalidation
b) Hooks to allow editing to revalidate the cache
c) A way to bind a Redux model that interacts with the caching strategy.
d) some other way of solving the "cache invalidation
The text was updated successfully, but these errors were encountered:
I recommend you try the following approach: use redux-thunk middleware and update the current page in the cache when committing row changes. The code snippet below illustrates this idea.
I'm using ...
Description
We have started to Add editable components to our Virtual Table, and have run in to some complexities around cache invalidation.
We are using Redux for state management, and have reducers that present the most recent page loaded and the skip value. As the user scrolls we notice that
Set up
Given:
a). The redux state does contains the most recent loaded data (e.g. based on time(n))
b). The Virtual table 'rows' prop mirrors the redux state
c). The virtual table also displays older data around that page (e.g. based on time(n-1), time(n-2). The components and model for these rows are held in a cache.
d). The cache elements are now disconnected from the redux state
When:
a) We edit a value in a cell component in page from (time(n-1) or time(n-2)
b) Save that change via a Redux command
Then
a) The the remote update will occur, and dispatch into Redux
b) The the update to the cached entry is no longer in Redux state, so the update will be a noop.
c) The user does not see their change reflected in the visible component.
The desired behaviour is that update consistency from Redux is maintained for cached rows.
Things we've tried:
It does not force a cache invalidation
Things we're going to try:
Things we could use if they were available:
Any of:
a) Control over cache entry invalidation
b) Hooks to allow editing to revalidate the cache
c) A way to bind a Redux model that interacts with the caching strategy.
d) some other way of solving the "cache invalidation
The text was updated successfully, but these errors were encountered: