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

Add the ability to touch a key's write time #73

Closed
whitfin opened this issue Sep 14, 2016 · 0 comments · Fixed by #75
Closed

Add the ability to touch a key's write time #73

whitfin opened this issue Sep 14, 2016 · 0 comments · Fixed by #75
Assignees
Milestone

Comments

@whitfin
Copy link
Owner

whitfin commented Sep 14, 2016

This is a prerequisite to having good LRU.

Slightly different to refresh in that we need to calculate any potential TTL deltas to make sure that it still expires at the same time.

For example:

# assume now is 1000ms

set({ "key", 1000, 500, "value" }) # would expire in 500ms

:timer.sleep(100)

touch("key") # this should become { "key", 1100, 400, "value" } so it still expires in 400ms
@whitfin whitfin added this to the v2.0.0 milestone Sep 14, 2016
@whitfin whitfin self-assigned this Sep 14, 2016
@whitfin whitfin changed the title Add the ability to touch a key to update the write time, but maintain the same TTL Add the ability to touch a key's write time Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant