Skip to content

Commit

Permalink
add Purge func to the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
knbr13 committed Apr 6, 2024
1 parent ef08b99 commit fbade17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ type Cache[K comparable, V any] interface {
// Keys returns a slice containing the keys of the cache in arbitrary order.
Keys() []K

// Purge clears the cache completely.
Purge()

// Count returns the number of key-value pairs in the cache.
Count() int

Expand Down

0 comments on commit fbade17

Please sign in to comment.