Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Cosentino committed Mar 1, 2023
1 parent e36c235 commit 8e2eb45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ goos: darwin
goarch: amd64
pkg: github.com/hyp3rd/hypercache/tests/benchmark
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkHyperCache_Get-16 39429110 115.7 ns/op 0 B/op 0 allocs/op
BenchmarkHyperCache_Get_ProactiveEviction-16 42094736 118.0 ns/op 0 B/op 0 allocs/op
BenchmarkHyperCache_List-16 10898176 437.0 ns/op 85 B/op 1 allocs/op
BenchmarkHyperCache_Set-16 3034786 1546 ns/op 252 B/op 4 allocs/op
BenchmarkHyperCache_Set_Proactive_Eviction-16 2725557 1833 ns/op 162 B/op 3 allocs/op
BenchmarkHyperCache_Get-16 37481116 115.7 ns/op 0 B/op 0 allocs/op
BenchmarkHyperCache_Get_ProactiveEviction-16 39486261 116.2 ns/op 0 B/op 0 allocs/op
BenchmarkHyperCache_List-16 11299632 412.0 ns/op 85 B/op 1 allocs/op
BenchmarkHyperCache_Set-16 2765406 1556 ns/op 248 B/op 4 allocs/op
BenchmarkHyperCache_Set_Proactive_Eviction-16 2947629 1700 ns/op 162 B/op 3 allocs/op
PASS
ok github.com/hyp3rd/hypercache/tests/benchmark 30.031s
```
Expand Down
7 changes: 3 additions & 4 deletions backend/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ import (

// Redis is a cache backend that stores the items in a redis implementation.
type Redis struct {
rdb *redis.Client // redis client to interact with the redis server
capacity int // capacity of the cache, limits the number of items that can be stored in the cache
keysSetName string // keysSetName is the name of the set that holds the keys of the items in the cache
// mutex sync.RWMutex // mutex to protect the cache from concurrent access
rdb *redis.Client // redis client to interact with the redis server
capacity int // capacity of the cache, limits the number of items that can be stored in the cache
keysSetName string // keysSetName is the name of the set that holds the keys of the items in the cache
Serializer serializer.ISerializer // Serializer is the serializer used to serialize the items before storing them in the cache
SortFilters // SortFilters holds the filters applied when listing the items in the cache
}
Expand Down

0 comments on commit 8e2eb45

Please sign in to comment.