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

fix(local-storage): removes duplicate createKey calls #82

Closed fasidOnGit closed 2 years ago

fasidOnGit commented 2 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Clearing cache while using the Localstorage strategy does not remove the cache and ttl from local storage.

Issue Number: #76

What is the new behavior?

calling clear() will now successfully removes respective cache items from localstorage.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

this is my first PR. yay :tada:

stackblitz[bot] commented 2 years ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.