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

Is this a bug about this.del function #96

Open
songjinzhong opened this issue Feb 8, 2018 · 2 comments
Open

Is this a bug about this.del function #96

songjinzhong opened this issue Feb 8, 2018 · 2 comments

Comments

@songjinzhong
Copy link

if (!isNaN(oldRecord.expire) && oldRecord.expire < Date.now()) {

When a record is about to expire, we take the initiative to delete it. And due to the running time of the program, oldRecord.expire < Date.now() === true, so the record will not be deleted.

@AsynchronousToddler
Copy link

Yeah, that seems silly to me. If you’re manually invoking a delete function then jr shouldn’t matter wether or not the record is expiring. It should delete it regardless

@IvanAdmaers
Copy link

I think it’s an interesting idea to have a method that won't delete a key if it isn't expired. But it’s really strange when you don't have an opportunity to delete something that doesn’t expired. In my similar package memory-cache-pro you can use the ‘delete(key)’ method to delete something and it doesn’t check the key expiration time

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

3 participants