mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-06 10:30:59 +08:00
21 lines
368 B
Go
21 lines
368 B
Go
package local
|
|
|
|
import "github.com/hashicorp/golang-lru/v2/simplelru"
|
|
|
|
type EvictCallback[K comparable, V any] simplelru.EvictCallback[K, V]
|
|
|
|
type LRU[K comparable, V any] interface {
|
|
Get(key K, fetch func() (V, error)) (V, error)
|
|
Del(key K) bool
|
|
Stop()
|
|
}
|
|
|
|
type Target interface {
|
|
IncrGetHit()
|
|
IncrGetSuccess()
|
|
IncrGetFailed()
|
|
|
|
IncrDelHit()
|
|
IncrDelNotFound()
|
|
}
|