forked from p53841790/wheat-cache
fix(setx): fix make cap
This commit is contained in:
parent
813b48b650
commit
0207878507
|
@ -19,6 +19,7 @@ func (d *Dao) SAdd(key *proto.BaseKey, setVal []string) (*proto.SAddResponse, er
|
||||||
hashVal.SetX(sv, sv)
|
hashVal.SetX(sv, sv)
|
||||||
}
|
}
|
||||||
d.lru.Add(key, hashVal)
|
d.lru.Add(key, hashVal)
|
||||||
|
return &proto.SAddResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
hashVal, ok := value.(structure.HashXInterface)
|
hashVal, ok := value.(structure.HashXInterface)
|
||||||
|
@ -60,7 +61,7 @@ func mathSDiff(masterItem []string, extKey []string) ([]string, error) {
|
||||||
m[bVal] = struct{}{}
|
m[bVal] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
setItem := make([]string, 0, len(extKey))
|
setItem := make([]string, 0, len(masterItem))
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
for _, sKey := range extKey {
|
for _, sKey := range extKey {
|
||||||
baseKey := proto.NewBaseKey(sKey)
|
baseKey := proto.NewBaseKey(sKey)
|
||||||
|
@ -160,7 +161,7 @@ func mathSInter(masterItem []string, extKey []string) ([]string, error) {
|
||||||
m[bVal] = struct{}{}
|
m[bVal] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
setItem := make([]string, 0, len(extKey))
|
setItem := make([]string, 0, len(masterItem))
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
for _, sKey := range extKey {
|
for _, sKey := range extKey {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue