-
Notifications
You must be signed in to change notification settings - Fork 2
[question] TtlCacheBacking - SystemTime or Instant? #7
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Comments
Sorry, I have not received any notification about this issue. |
About to leave, - tests were passing. If you don't mind give it a shot and let me know if you encounter any issues with it or if it's good to go! :) |
Since there was no action on this ticket for more than 2 weeks and the PR was sitting there waiting for a review, I've went ahead and merged this, since I did not observe any issues myself. Thank you! |
Hi, Thankyou! |
Hi,
I was looking at this crate, evaluating it for my use.
While examining the code of
TtlCacheBacking
I've noticed that it's usingSystemTime
in order to determine the age of a cached entry.My question is, why
SystemTime
instead ofInstance
? Was this due to a problem which you've encountered?The reason for my questions is a caveat with
SystemTime
which each call toSystemTime::now()
translates to a system call (at least on Linux) - a relatively slow operation.Under heavy load, the affect of this can be significant.
Instant
, on the other hand, does not suffer from the same problem.The text was updated successfully, but these errors were encountered: