feat(lru): change string to proto.KeyBase

This commit is contained in:
HuangJiaLuo 2021-10-06 20:38:56 +08:00
parent d08e50f4ce
commit f9ad4d914e
1 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package lru
import (
"gitee.com/timedb/wheatCache/pkg/proto"
"gitee.com/timedb/wheatCache/pkg/structure"
"sync"
)
@ -26,7 +27,8 @@ const (
type CacheInterface interface {
Del() error
Get(key string) (structure.KeyBaseInterface, bool)
Add(key string, val structure.KeyBaseInterface)
Get(key *proto.BaseKey) (structure.KeyBaseInterface, bool)
Add(key *proto.BaseKey, val structure.KeyBaseInterface)
UpdateLruSize(length structure.UpdateLength)
DelByKey(key *proto.BaseKey) error
}