Skip to content
Snippets Groups Projects
Commit f2a84639 authored by Andrei Mihu's avatar Andrei Mihu
Browse files

Clean up unused cache parameters.

parent ce8d3921
Branches
Tags
No related merge requests found
......@@ -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)
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment