ngx-cache
ngx-cache copied to clipboard
clear method deletes every object in storage
I'm submitting a ...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Support request => <!-- Please check the repository for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
Current behavior Method clear() of LocalStorageCacheService deletes all objects from the browser's local storage.
Expected/desired behavior Should only delete objects from the browser's local storage, which are also in the CACHE.
Minimal reproduction of the problem with instructions Not needed.
What is the motivation / use case for changing the behavior? I want to be able to delete all object in the cache at once, instead of removing them one by one using the method remove(key: string | number, wild = false).
Environment
-
Angular version: 5.x
-
Browser: N/A
-
For Tooling issues: N/A
@janetttt sorry for the delay, had busy times. feel free to fire a PR and i'll approve.