-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-read the current time after a computation (fixes #191)
Previously, the current time was read once at the beginning of the computation. This was used to determine if the entry had expired and, when computed, the associated timestamp. For long computations and short expiration times, this could result in the newly computed entry being expired. A chain of computations would build up, each with timestamps older than the last due to waiting for its predecessor. Now the ticker is read again after the computation completes and the timestamps are set. This means there are two reads on a computation, but only 1 in the happy path of a cache hit. Note that obtaining the time can be an expensive operation, so minimizing this is useful for high loads. Updated dependencies and fixed issues discovered by Spotbugs and ErrorProne.
- Loading branch information
Showing
12 changed files
with
186 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.