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

Make peek() use shm:ttl() to avoid touching shm LRU #39

Open
thibaultcha opened this issue Feb 20, 2018 · 0 comments
Open

Make peek() use shm:ttl() to avoid touching shm LRU #39

thibaultcha opened this issue Feb 20, 2018 · 0 comments

Comments

@thibaultcha
Copy link
Owner

this would be breaking because we would not retrieve "value" anymore - can be added as an option

thibaultcha added a commit that referenced this issue Jun 5, 2018
Use the new `shm:ttl()` API which was contributed in order to support
mlcache's `peek()` method. The existing `peek()` implementation was a
temporary solution until then. It is slightly unfortunate that we chose
to return the value along with the remaining TTL, as this behavior now
must break.

Pros/cons
---------
+ As a result, `peek()` is ligher and thus, faster
+ It does not touch the shm LRU queue
- It is a breaking change

Fix #39
thibaultcha added a commit that referenced this issue Jun 5, 2018
Use the new `shm:ttl()` API which was contributed in order to support
mlcache's `peek()` method. The existing `peek()` implementation was a
temporary solution until then. It is slightly unfortunate that we chose
to return the value along with the remaining TTL, as this behavior now
must break.

Pros/cons
---------
+ As a result, `peek()` is ligher and thus, faster
+ It does not touch the shm LRU queue
- It is a breaking change

Fix #39
@thibaultcha thibaultcha changed the title [enhancement] make peek() use shm:ttl() to avoid touching shm LRU Make peek() use shm:ttl() to avoid touching shm LRU Aug 30, 2021
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

1 participant