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

Cache Chain Compilation Error Due to Ristretto 1.0.0 Upgrade to Generics #259

Open
febelery opened this issue Oct 16, 2024 · 0 comments
Open

Comments

@febelery
Copy link

Issues:

  1. Ristretto 1.0.0 has introduced generics support, causing our existing cache chain calls to fail.
  2. The code needs to be updated to accommodate Ristretto's new generic API.

Expected Solution:

  1. Update the Ristretto initialization code to use the new generic API.
  2. Adjust the creation of the cache chain to ensure correct type parameter passing.
  3. If necessary, update other related cache operation code.

Additional Information:

  • Ristretto version: 1.0.0
  • Caching library used: github.com/eko/gocache
var ristredb   *ristretto.Cache[string, any]
cache, err := ristretto.NewCache(&ristretto.Config[string, any]{
	NumCounters: 1e7,
	MaxCost:     1 << 30,
	BufferItems: 64,
})
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