Commit f2a84639 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Clean up unused cache parameters.

parent ce8d3921
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -139,8 +139,8 @@ func main() {
	cookie := newOrLoadCookie(config)
	metrics := server.NewLocalMetrics(logger, startupLogger, db, config)
	sessionRegistry := server.NewLocalSessionRegistry(metrics)
	sessionCache := server.NewLocalSessionCache(config, config.GetSession().TokenExpirySec)
	consoleSessionCache := server.NewLocalSessionCache(config, config.GetConsole().TokenExpirySec)
	sessionCache := server.NewLocalSessionCache(config.GetSession().TokenExpirySec)
	consoleSessionCache := server.NewLocalSessionCache(config.GetConsole().TokenExpirySec)
	statusRegistry := server.NewStatusRegistry(logger, config, sessionRegistry, jsonpbMarshaler)
	tracker := server.StartLocalTracker(logger, config, sessionRegistry, statusRegistry, metrics, jsonpbMarshaler)
	router := server.NewLocalMessageRouter(sessionRegistry, tracker, jsonpbMarshaler)
+1 −4
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ type sessionCacheUser struct {

type LocalSessionCache struct {
	sync.RWMutex
	config Config

	ctx         context.Context
	ctxCancelFn context.CancelFunc
@@ -56,12 +55,10 @@ type LocalSessionCache struct {
	cache map[uuid.UUID]*sessionCacheUser
}

func NewLocalSessionCache(config Config, tokenExpirySec int64) SessionCache {
func NewLocalSessionCache(tokenExpirySec int64) SessionCache {
	ctx, ctxCancelFn := context.WithCancel(context.Background())

	s := &LocalSessionCache{
		config: config,

		ctx:         ctx,
		ctxCancelFn: ctxCancelFn,