mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
Fix so that correct cache is provided to di registry (#17566)
This fix prevents Grafana from crashing after being logged in. Ref #17519
This commit is contained in:
parent
073851f9c7
commit
e1df51109e
@ -12,13 +12,13 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/facebookgo/inject"
|
||||
"github.com/patrickmn/go-cache"
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/grafana/grafana/pkg/api"
|
||||
"github.com/grafana/grafana/pkg/api/routing"
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
_ "github.com/grafana/grafana/pkg/extensions"
|
||||
"github.com/grafana/grafana/pkg/infra/localcache"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
_ "github.com/grafana/grafana/pkg/infra/metrics"
|
||||
_ "github.com/grafana/grafana/pkg/infra/remotecache"
|
||||
@ -88,7 +88,7 @@ func (g *GrafanaServerImpl) Run() error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to provide object to the graph: %v", err)
|
||||
}
|
||||
err = serviceGraph.Provide(&inject.Object{Value: cache.New(5*time.Minute, 10*time.Minute)})
|
||||
err = serviceGraph.Provide(&inject.Object{Value: localcache.New(5*time.Minute, 10*time.Minute)})
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to provide object to the graph: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user