Skip to content

Commit c32ad19

Browse files
BorntraegerMarcdougwilson
authored andcommitted
docs: expand description of the rolling option
closes #677
1 parent 9a5e313 commit c32ad19

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,24 @@ likely need `resave: true`.
228228

229229
##### rolling
230230

231-
Force a session identifier cookie to be set on every response. The expiration
231+
Force the session identifier cookie to be set on every response. The expiration
232232
is reset to the original [`maxAge`](#cookiemaxage), resetting the expiration
233233
countdown.
234234

235235
The default value is `false`.
236236

237+
With this enabled, the session identifier cookie will expire in
238+
[`maxAge`](#cookiemaxage) since the last response was sent instead of in
239+
[`maxAge`](#cookiemaxage) since the session was last modified by the server.
240+
241+
This is typically used in conjuction with short, non-session-length
242+
[`maxAge`](#cookiemaxage) values to provide a quick timeout of the session data
243+
with reduced potentional of it occurring during on going server interactions.
244+
237245
**Note** When this option is set to `true` but the `saveUninitialized` option is
238246
set to `false`, the cookie will not be set on a response with an uninitialized
239-
session.
247+
session. This option only modifies the behavior when an existing session was
248+
loaded for the request.
240249

241250
##### saveUninitialized
242251

0 commit comments

Comments
 (0)