-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Memcached: Fix issue where non-zero TTLs were trunctated to zero (#530)
Fixes an issue where if a non-zero TTL smaller than a full second was passed to the `SetAsync` or `SetMultiAsync` methods, the TTL would be truncated to zero seconds which results in the item being cached forever. Specifically, this fixes an issue in Mimir where items that were supposed to have a several minute TTL computed as `$ttl - time.Since($start)` ended up being cached forever. They were never evicted by Memcached because there was no need to free space in this particular cache due to low usage. Signed-off-by: Nick Pillitteri <[email protected]>
- Loading branch information
1 parent
c73f165
commit 87c7e9e
Showing
3 changed files
with
56 additions
and
17 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