Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding control of expiration time in localstorage. Issue #133. #153

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

Open
rodrigo-morais wants to merge 2 commits into grevory:master
base: master
Choose a base branch
Loading
from rodrigo-morais:master

Conversation

@rodrigo-morais
Copy link

@rodrigo-morais rodrigo-morais commented Oct 23, 2014

Hello,

I created a control to expiration time in localstorage.

For example:
localStorageService.get('key', 300000); -> Verify if expiration time happened for 5 minutes in milliseconds.

Important, when need use localstorage against sessionstorage and must control expiration time.

Thanks.

raduq reacted with thumbs up emoji
Copy link

Coverage Status

Coverage decreased (-0.05%) when pulling e92355a on rodrigo-morais:master into d85bdb5 on grevory:master.

Copy link
Collaborator

a8m commented Oct 23, 2014

Ah.. I got it.
It's not a real expiration, the value still in the localStorage...
mm.. I'm think we need the users feedback..

Copy link
Author

If everyone think necessary, I can clear the key in localStorage.

I didn't that because in my use case was unnecessary and I not thought about.

Copy link

this is very useful! (y)

Copy link

Is this TTL support basically? if so, I rolled my own but would love to use the "built in" one.

Copy link

brantje commented Nov 1, 2014

Would be awsome to have this.

Copy link
Author

Hello,

I added for expiration data the option to remove key from localStorage.
When method get is called with true in last/third parameter and expiration happen then the key will be remove from localStorage.

For example:
localStorageService.get('key', 300000, true); -> Verify if expiration time happened for 5 minutes in milliseconds and if happens the key will be remove from localStorage.

The standard of remove flag is false. If not pass anything in parameter the key won't be remove.

Thanks.

Copy link

I need this.

Copy link

raduq commented Oct 26, 2016

I want this feature.

Copy link
Owner

grevory commented Jun 19, 2017

Is anyone interested in fixing up this PR? This seems to be very desired among users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /