-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove errors from set methods on RemoteCacheClient interface (#466)
This change does a few things: * Removes the error from the set method on the `RemoteCacheClient` interface. The only error that can be returned was an error when the async queue used for `set` operations was full. All other errors were logged and a counter incremented. Even for this error, it was special-cased and `nil` was returned instead. Thus, the interface included an `error` return value that could never actually happen. * Adds another method, `SetMultiAsync` to the interface for setting multiple key-value pairs at once. This was the only functionality that the `remoteCache` struct was providing beyond the cache clients it was wrapping. With this new method, there's no longer a reason to keep it around (will address in a follow-up PR). * Uses relative TTLs for Memcached items. Memcached supports using a relative TTL (e.g. 300 for an item that expires after 5 minutes) or absolute TTL (a particular UNIX timestamp). We were converting `time.Duration` objects to an absolute TTL for no reason. Part of #452 Signed-off-by: Nick Pillitteri <[email protected]>
- Loading branch information
1 parent
824e75a
commit b9a439d
Showing
10 changed files
with
54 additions
and
41 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
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