Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
yujieli-temporal committed Aug 8, 2023
1 parent ed22dc2 commit f368b5c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/cache/lru.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ func (c *lru) putInternal(key interface{}, value interface{}, allowUpdate bool)
return nil, ErrCacheFull
}
}
c.currSize -= existingEntry.Size()
existingEntry.value = value
existingEntry.size = newEntrySize
c.currSize = newCacheSize
Expand Down Expand Up @@ -330,7 +329,7 @@ func (c *lru) putInternal(key interface{}, value interface{}, allowUpdate bool)
c.updateEntryRefCount(entry)
element := c.byAccess.PushFront(entry)
c.byKey[key] = element
c.currSize += newEntrySize
c.currSize = newCacheSize
return nil, nil
}

Expand Down

0 comments on commit f368b5c

Please sign in to comment.