Skip to content

Commit

Permalink
set timeout in seconds to one hour, and set resave to true to update …
Browse files Browse the repository at this point in the history
…time to live on user action.
  • Loading branch information
jonaslan committed Feb 3, 2017
1 parent ba7f799 commit 6b0be19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const session = require('express-session')
const RedisStore = require('connect-redis')(session)
const _ = require('lodash')

const oneHour = 3600000
const oneHour = 3600 // time in seconds!

const defaults = {
useRedis: false,
Expand All @@ -16,7 +16,7 @@ const defaults = {
},
sessionOptions: {
secret: '',
resave: false,
resave: true, // update time to live on usage
saveUninitialized: false
}
}
Expand Down

0 comments on commit 6b0be19

Please sign in to comment.