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
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:
Current behavior
I have a requets that updates a resource on the server and I called pipe on the resulting observable with a tap operator where I cleared a cachebucket. After clearing said cachebucket I called my backend to fetch the updated resource. However I get the cached version back. I also tried with a 2 second delay but it would still return the cache version (even though I cleared the cachebucket using the manager). However I use cachebuckets all over the place and they work. What I realized though is that most of the time after saving I redirect the user to another place.
Now I managed to fix this by adding a cleareCachePredicate to my request:
I would expect the http service to send a fresh request to the server and return the updated entity instead of the cashew cached version.
Minimal reproduction of the problem with instructions
As described above: send a request to get the entity first, then send a request to update the entity and pipe the resulting observable and clear the bucket using a tap operator and then right after, send another request to fetch the updated entity.
Environment
Angular version: 18.2.11
Browser:
- [x] Chrome (desktop) Version 130.0.6723.70 (Official Build) (64-bit)
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
Others:
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
I have a requets that updates a resource on the server and I called pipe on the resulting observable with a tap operator where I cleared a cachebucket. After clearing said cachebucket I called my backend to fetch the updated resource. However I get the cached version back. I also tried with a 2 second delay but it would still return the cache version (even though I cleared the cachebucket using the manager). However I use cachebuckets all over the place and they work. What I realized though is that most of the time after saving I redirect the user to another place.
Now I managed to fix this by adding a cleareCachePredicate to my request:
this works but clearly something is broken.
Expected behavior
I would expect the http service to send a fresh request to the server and return the updated entity instead of the cashew cached version.
Minimal reproduction of the problem with instructions
As described above: send a request to get the entity first, then send a request to update the entity and pipe the resulting observable and clear the bucket using a tap operator and then right after, send another request to fetch the updated entity.
Environment
The text was updated successfully, but these errors were encountered: