-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add expiration tracker. #188
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
Conversation
|
|
||
| namespace launchdarkly::server_side::data_store { | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to its own file so it could be re-used.
| @@ -0,0 +1,51 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I scaffolded this file, but have not started on implementation.
| @@ -0,0 +1,37 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from dependency_tracker.hpp
| ExpirationTracker ttl_tracker_; | ||
| }; | ||
|
|
||
| } // namespace launchdarkly::server_side::data_store::persistent No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a blank line.
This adds an class for tracking expiration of "scoped" (DataKind) and "unscoped" (initialized) keys.
Time handling is left to the caller, and proactive eviction could be handled using the prune methods.
(If we end up wanting to encapsulate time, then we could add a layer that just calls
steady_clock::now()