mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-26 06:50:36 -05:00
Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 1.1.1 to 1.1.2. - [Commits](https://github.com/olekukonko/tablewriter/compare/v1.1.1...v1.1.2) --- updated-dependencies: - dependency-name: github.com/olekukonko/tablewriter dependency-version: 1.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
13 lines
530 B
Go
13 lines
530 B
Go
package twcache
|
|
|
|
// Cache defines a generic interface for a key-value storage with type constraints on keys and values.
|
|
// The keys must be of a type that supports comparison.
|
|
// Add inserts a new key-value pair, potentially evicting an item if necessary.
|
|
// Get retrieves a value associated with the given key, returning a boolean to indicate if the key was found.
|
|
// Purge clears all items from the cache.
|
|
type Cache[K comparable, V any] interface {
|
|
Add(key K, value V) (evicted bool)
|
|
Get(key K) (value V, ok bool)
|
|
Purge()
|
|
}
|