Skip to content

Commit

Permalink
Merge pull request #158 from philippgille/update-bigcache-from-v2-to-v3
Browse files Browse the repository at this point in the history
Update BigCache from v2 to v3
  • Loading branch information
philippgille authored Dec 5, 2023
2 parents 9ff6a17 + ef67ed6 commit b267a13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions bigcache/bigcache.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package bigcache

import (
"context"
"time"

"github.com/allegro/bigcache/v2"
"github.com/allegro/bigcache/v3"

"github.com/philippgille/gokv/encoding"
"github.com/philippgille/gokv/util"
Expand Down Expand Up @@ -115,7 +116,7 @@ func NewStore(options Options) (Store, error) {

config := bigcache.DefaultConfig(options.Eviction)
config.HardMaxCacheSize = options.HardMaxCacheSize
cache, err := bigcache.NewBigCache(config)
cache, err := bigcache.New(context.Background(), config)
if err != nil {
return result, err
}
Expand Down
2 changes: 1 addition & 1 deletion bigcache/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/philippgille/gokv/bigcache
go 1.20

require (
github.com/allegro/bigcache/v2 v2.2.5
github.com/allegro/bigcache/v3 v3.1.0
github.com/philippgille/gokv/encoding v0.6.0
github.com/philippgille/gokv/test v0.6.0
github.com/philippgille/gokv/util v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions bigcache/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/allegro/bigcache/v2 v2.2.5 h1:mRc8r6GQjuJsmSKQNPsR5jQVXc8IJ1xsW5YXUYMLfqI=
github.com/allegro/bigcache/v2 v2.2.5/go.mod h1:FppZsIO+IZk7gCuj5FiIDHGygD9xvWQcqg1uIPMb6tY=
github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk=
github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I=
github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho=
github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/philippgille/gokv v0.5.1-0.20191011213304-eb77f15b9c61 h1:GIHjzzfFa5MP+gaNJfa1Y9/L1qjh2NCKWcGIbJVizDs=
Expand Down

0 comments on commit b267a13

Please sign in to comment.