mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-28 03:32:03 +08:00
19 lines
378 B
Go
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
|
|
}
|