Skip to content
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

clear method deletes every object in storage #110

Open
janetttt opened this issue Aug 1, 2018 · 1 comment
Open

clear method deletes every object in storage #110

janetttt opened this issue Aug 1, 2018 · 1 comment

Comments

@janetttt
Copy link

janetttt commented Aug 1, 2018

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

@fulls1z3 fulls1z3 changed the title Method clear() of LocalStorageCacheService also deletes objects, which are not in the CACHE clear method deletes every object in storage Dec 24, 2018
@fulls1z3 fulls1z3 self-assigned this Dec 24, 2018
@fulls1z3
Copy link
Owner

@janetttt sorry for the delay, had busy times. feel free to fire a PR and i'll approve.

@fulls1z3 fulls1z3 removed their assignment Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants