func NewMemoryCache(keyPrefix string, encoding encoding.Encoding) Cache {
	config := &ristretto.Config{
		NumCounters: 1e7,      
		MaxCost:     1 << 30,  
		BufferItems: 64,       
	}
	store, _ := ristretto.NewCache(config)
	return &memoryCache{
		client:    store,
		KeyPrefix: keyPrefix,
		encoding:  encoding,
	}
}
NewMemoryCache create a memory cache
package cache
import (
	"context"
	"reflect"
	"time"
	"github.com/dgraph-io/ristretto"
	"github.com/pkg/errors"
	"github.com/go-eagle/eagle/pkg/encoding"
	"github.com/go-eagle/eagle/pkg/log"
)
type memoryCache struct {
	client    *ristretto.Cache
	KeyPrefix string
	encoding  encoding.Encoding
}