forked from p93542168/wheat-cache
feat(lru): change string to proto.KeyBase
This commit is contained in:
parent
d08e50f4ce
commit
f9ad4d914e
|
@ -1,6 +1,7 @@
|
||||||
package lru
|
package lru
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"gitee.com/timedb/wheatCache/pkg/proto"
|
||||||
"gitee.com/timedb/wheatCache/pkg/structure"
|
"gitee.com/timedb/wheatCache/pkg/structure"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
@ -26,7 +27,8 @@ const (
|
||||||
|
|
||||||
type CacheInterface interface {
|
type CacheInterface interface {
|
||||||
Del() error
|
Del() error
|
||||||
Get(key string) (structure.KeyBaseInterface, bool)
|
Get(key *proto.BaseKey) (structure.KeyBaseInterface, bool)
|
||||||
Add(key string, val structure.KeyBaseInterface)
|
Add(key *proto.BaseKey, val structure.KeyBaseInterface)
|
||||||
UpdateLruSize(length structure.UpdateLength)
|
UpdateLruSize(length structure.UpdateLength)
|
||||||
|
DelByKey(key *proto.BaseKey) error
|
||||||
}
|
}
|
Loading…
Reference in New Issue