Skip to content

Commit

Permalink
fix: Fix redis default maxAge
Browse files Browse the repository at this point in the history
  • Loading branch information
leoliu committed Jun 8, 2020
1 parent 3b798bd commit cbe8958
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class RedisStore extends Store {
return JSON.parse(data)
}

async set(session, { sid = uid.sync(24), maxAge = 3600000 } = {}) {
// maxAge unit is second.
async set(session, { sid = uid.sync(24), maxAge = 3600 } = {}) {
await this.redis
.set(`sid-${sid}`, JSON.stringify(session), 'EX', maxAge)
.catch(this.catch)
Expand Down

0 comments on commit cbe8958

Please sign in to comment.