@@ -124,7 +124,7 @@ func (s *cacheShard) set(key string, hashedKey uint64, entry []byte) error {
124
124
125
125
if previousIndex := s .hashmap [hashedKey ]; previousIndex != 0 {
126
126
if previousEntry , err := s .entries .Get (int (previousIndex )); err == nil {
127
- resetKeyFromEntry (previousEntry )
127
+ resetHashFromEntry (previousEntry )
128
128
//remove hashkey
129
129
delete (s .hashmap , hashedKey )
130
130
}
@@ -176,7 +176,7 @@ func (s *cacheShard) addNewWithoutLock(key string, hashedKey uint64, entry []byt
176
176
func (s * cacheShard ) setWrappedEntryWithoutLock (currentTimestamp uint64 , w []byte , hashedKey uint64 ) error {
177
177
if previousIndex := s .hashmap [hashedKey ]; previousIndex != 0 {
178
178
if previousEntry , err := s .entries .Get (int (previousIndex )); err == nil {
179
- resetKeyFromEntry (previousEntry )
179
+ resetHashFromEntry (previousEntry )
180
180
}
181
181
}
182
182
@@ -265,7 +265,7 @@ func (s *cacheShard) del(hashedKey uint64) error {
265
265
if s .statsEnabled {
266
266
delete (s .hashmapStats , hashedKey )
267
267
}
268
- resetKeyFromEntry (wrappedEntry )
268
+ resetHashFromEntry (wrappedEntry )
269
269
}
270
270
s .lock .Unlock ()
271
271
@@ -332,7 +332,7 @@ func (s *cacheShard) removeOldestEntry(reason RemoveReason) error {
332
332
if err == nil {
333
333
hash := readHashFromEntry (oldest )
334
334
if hash == 0 {
335
- // entry has been explicitly deleted with resetKeyFromEntry , ignore
335
+ // entry has been explicitly deleted with resetHashFromEntry , ignore
336
336
return nil
337
337
}
338
338
delete (s .hashmap , hash )
0 commit comments