Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
key: remove Manager and export Cache
This commit is a refactoring of the `internal/key` package that removes the `Manager` type and exports the `Cache` type. Now, an arbitrary key store can be wrapped by a cache like this: ``` cache := key.NewCache(store, key.CacheConfig{ Expiry: 5 * time.Minute, ExpiryUnused: 30 * time.Second, }) ``` Furthermore, a `Cache` satisfies the `key.Store` interface. This is an important property that will be relevant later on when we add a stateful implementation. Signed-off-by: Andreas Auernhammer <hi@aead.dev>
- Loading branch information
Showing
8 changed files
with
303 additions
and
298 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
Oops, something went wrong.