I have error in golang 1.17.1

hi,i can not get key when i test ristretto cache,Is there something wrong with my code?

var GCache *ristretto.Cache

func New() *ristretto.Cache {
	var err   error
	icache, err := ristretto.NewCache(&ristretto.Config{
		NumCounters: 640000,     // number of keys to track frequency of (10M).
		MaxCost:     64000, // maximum cost of cache (1GB).
		BufferItems: 64,      // number of keys per Get buffer.
	if err != nil {
	return icache
func TestNew(t *testing.T) {
	c := New()
	require.NotNil(t, c)
	require.True(t, c.Set("aaaadddffdfrergdfgdfg", 1, 0))
	require.True(t, ok)


Which versions of golang does this library support?

i have solved this problem.must use c.Wait() after set().