ngneat / cashew

🐿 A flexible and straightforward library that caches HTTP requests in Angular
https://www.netbasal.com
MIT License
685 stars 33 forks source link

Cache bucket not being cleared #103

Closed doucsag closed 3 weeks ago

doucsag commented 3 weeks ago

I'm submitting a...


[ ] 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

When using the httpmanager to clear a cachebucket or calling clear directly on the cache bucket, the bucket is not being cleared: image

image

The bucket shows both size 0 and 1 and the entry is still there. This leads to caching issues.

Expected behavior

The cache bucket should be empty.

Minimal reproduction of the problem with instructions

Clear a bucket and then print it in the console.

Environment


Angular version: 18.2.1

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

doucsag commented 3 weeks ago

Actually I was looking at the wrong console print, still got an issue where I am passing in a cache bucket which hasn't been cleared but that might be different issue.