10 lines
292 B
Go
10 lines
292 B
Go
package cache
|
|
|
|
// Interface defines a generic cache with get and put operations.
|
|
type Interface[K comparable, V any] interface {
|
|
// Get retrieves a value from the cache by key, returns zero value if not found
|
|
Get(key K) V
|
|
// Put stores a key-value pair in the cache
|
|
Put(key K, value V)
|
|
}
|