14 lines
308 B
Go
14 lines
308 B
Go
|
package cache
|
||
|
|
||
|
// Hashable types must implement a method that returns a key. This key will be
|
||
|
// associated with a cached value.
|
||
|
type Hashable interface {
|
||
|
Hash() uint64
|
||
|
}
|
||
|
|
||
|
// HasOnEvict type is (optionally) implemented by cache objects to clean after
|
||
|
// themselves.
|
||
|
type HasOnEvict interface {
|
||
|
OnEvict()
|
||
|
}
|