Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nakama
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public-projects
Nakama
Commits
f2a84639
Commit
f2a84639
authored
2 years ago
by
Andrei Mihu
Browse files
Options
Downloads
Patches
Plain Diff
Clean up unused cache parameters.
parent
ce8d3921
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.go
+2
-2
2 additions, 2 deletions
main.go
server/session_cache.go
+1
-4
1 addition, 4 deletions
server/session_cache.go
with
3 additions
and
6 deletions
main.go
+
2
−
2
View file @
f2a84639
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
server/session_cache.go
+
1
−
4
View file @
f2a84639
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment