-
Notifications
You must be signed in to change notification settings - Fork 345
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
How to invalidate cache after a create, update or delete operation? #1005
Comments
This is not an akita but an angular feature you're missing . For example (and simplicity) You can use an async pipe with an observable you select from the query when you set your datatable datasource. Then , if you do correct updates/delete, etc, everything will be "automagic". If you use a smart/dumb architecture the async pipe can be on your dumb component @input . The async pipe subscribes to the observable AND unsubscribes when the component gets destroyed , this is the only thing you need |
Can someone provide me an example, or explanation, of how to invalidate my cache, or to re-fetch data for the currently selected filters when i perform create, update or delete operations, I am in desperate need :(
For eg., I have a row with a delete button on it. When I click it, nothing changes, but when i refresh it does change...
Angular 13 & Akita 7
The text was updated successfully, but these errors were encountered: