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

how do i get cache and update time expired? #104

Open
thichpv opened this issue Jul 23, 2018 · 1 comment
Open

how do i get cache and update time expired? #104

thichpv opened this issue Jul 23, 2018 · 1 comment

Comments

@thichpv
Copy link

thichpv commented Jul 23, 2018

how do i get cache and update time expired? Thank you!

@IvanAdmaers
Copy link

There are no ways to delete not expired key in this package.
If you use my similar package memory-cache-pro it’s possible by following the steps below.

// Get the cache
const value = cache.get(‘key’);
// Delete current key
cache.delete(‘key’);
// Set a new key with a new time
const 1hour = 1 * 1000 * 60 * 60;
cache.put(‘key’, value, 1hour);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants