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 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
} }