Skip to content

Commit

Permalink
Clean up unused cache parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyro committed Jul 2, 2022
1 parent ce8d392 commit f2a8463
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions main.go
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions server/session_cache.go
Expand Up @@ -48,20 +48,17 @@ type sessionCacheUser struct {

type LocalSessionCache struct {
sync.RWMutex
config Config

ctx context.Context
ctxCancelFn context.CancelFunc

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,

Expand Down

0 comments on commit f2a8463

Please sign in to comment.