-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching "bug" when fetching data #3727
Comments
Thank you for opening this issue. In order to confirm it, we'll have to reproduce it. https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple This is the simplest way to confirm a bug is related to the React Admin codebase. Moreover, in general, please follow the template for bug report (which version of react admin are you refering to? etc) |
well you cannot reproduce it by using the simple example codesandbox because changing the fake backend data causes whole app to reload and thus negating the RA caching noticed it on v3 but v2 seems to use similar code edit: it would probably help if there was some way to set cache delay in List/Edit/Show and/or some way to force current page fresh load (not counting F5) |
Confirmed, the bug exists in the |
any news respecting this issue? Had the same bug. Is there a way to disable caching? |
Fixed by #4261 |
Just noticed a weird "bug" in ra-core/src/reducer/admin/resource/data.ts
When fetching data they get cached, but when one (or more) of the items is deleted on the backend, the RA cache fails to remove it from existing items.
ie. lets have data:
[{id: 1, name: "one"}, {id:2,name:"two"}]
it gets fetched by GET_LIST and cached
then the data on api is changed, ie. by another app (mobile,db,...)
when you press refresh in RA you get new data without the deleted item
[{id:2,name:"two"}]
but the addRecord method looks on the incoming data and says "look item one is not here, lets just return the old one" and so you have stale data
The text was updated successfully, but these errors were encountered: