Skip to content

Commit

Permalink
Add named params to interface methods (#3335)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav authored Sep 26, 2024
1 parent c57b6b0 commit 0ba3fa1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ package cache
// Cache is used to store key/value pairs.
type Cache[T any] interface {
// Set stores the given key/value pair.
Set(string, T)
Set(key string, val T)
// Get returns the value for the given key and a boolean indicating if the key was found.
Get(string) (T, bool)
Get(key string) (T, bool)
// Exists returns true if the given key exists in the cache.
Exists(string) bool
Exists(key string) bool
// Delete the given key from the cache.
Delete(string)
Delete(key string)
// Clear all key/value pairs from the cache.
Clear()
// Count the number of key/value pairs in the cache.
Expand Down

0 comments on commit 0ba3fa1

Please sign in to comment.