blob: d7e71b8f9bbc1450ed3987d2a89710ff0e93a5e4 [file] [log] [blame]
// Package cache defines an interface for an LRU cache.
package cache
// Cache in an interface for an LRU cache.
type Cache interface {
// Add adds a value to the cache.
Add(key string, value interface{})
// Get looks up a key's value from the cache, returning the value and true
// if found, otherwise the returned bool is false.
Get(key string) (interface{}, bool)
// Exists returns true if the key is found in the cache.
Exists(key string) bool
}