Skip to content

Commit

Permalink
CacheKV speedups
Browse files Browse the repository at this point in the history
  • Loading branch information
ValarDragon authored and czarcas7ic committed Feb 10, 2024
1 parent 738419c commit cedda88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions store/cachekv/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (store *Store) Write() {
defer store.mtx.Unlock()

if len(store.cache) == 0 && len(store.unsortedCache) == 0 {
store.sortedCache = nil
store.resetSortedCache()
return
}

Expand Down Expand Up @@ -145,7 +145,7 @@ func (store *Store) Write() {
for key := range store.unsortedCache {
delete(store.unsortedCache, key)
}
store.sortedCache = nil
store.resetSortedCache()
}

// CacheWrap implements CacheWrapper.
Expand Down

0 comments on commit cedda88

Please sign in to comment.