signoz/pkg/cache/cachetest/provider.go
2025-05-23 15:52:58 +05:30

19 lines
378 B
Go

package cachetest
import (
"context"
"github.com/SigNoz/signoz/pkg/cache"
"github.com/SigNoz/signoz/pkg/cache/memorycache"
"github.com/SigNoz/signoz/pkg/factory/factorytest"
)
func New(config cache.Config) (cache.Cache, error) {
cache, err := memorycache.New(context.TODO(), factorytest.NewSettings(), config)
if err != nil {
return nil, err
}
return cache, nil
}