Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChainCache.Get failing with BigCache store v4.2.0 (GetWithTTL not implemented error) #225

Open
butaca opened this issue Sep 8, 2023 · 0 comments

Comments

@butaca
Copy link

butaca commented Sep 8, 2023

When using BigCache in a chain, ChainCache.Get fails because it uses GetWithTTL and that function in BigCache is not implemented and returns an error. The change was merged recently: d94f5d2 in big cache store v4.2.0 store/bigcache/v4.1.2...store/bigcache/v4.2.0

Steps for Reproduction

  1. Set up a chain cache with a BigCache store
bigcacheClient, _ := bigcache.New(ctx, bigcache.DefaultConfig(5 * time.Minute))
bigcacheStore := bigcache_store.NewBigcache(bigcacheClient)
bigCacheCache := cache.New[[]byte](bigcacheStore)
chain := cache.NewChain[[]byte](bigCacheCache)
  1. Get a value
_, err := chain.Get(ctx, "key")
fmt.Printf("%v\n", err)
  1. See how it returns an error

Expected behavior:
The function does not return an error

Actual behavior:
The function returns an error

Platforms:

macOS and dockerized Linux from scratch

Versions:

gocache v4.1.4
go 1.21
BigCache store v4.2.0
BigCache v3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant