Skip to content

Commit

Permalink
docs: expand description of the rolling option
Browse files Browse the repository at this point in the history
closes #677
  • Loading branch information
BorntraegerMarc authored and dougwilson committed Oct 8, 2019
1 parent 9a5e313 commit c32ad19
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Expand Up @@ -228,15 +228,24 @@ likely need `resave: true`.

##### rolling

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

The default value is `false`.

With this enabled, the session identifier cookie will expire in
[`maxAge`](#cookiemaxage) since the last response was sent instead of in
[`maxAge`](#cookiemaxage) since the session was last modified by the server.

This is typically used in conjuction with short, non-session-length
[`maxAge`](#cookiemaxage) values to provide a quick timeout of the session data
with reduced potentional of it occurring during on going server interactions.

**Note** When this option is set to `true` but the `saveUninitialized` option is
set to `false`, the cookie will not be set on a response with an uninitialized
session.
session. This option only modifies the behavior when an existing session was
loaded for the request.

##### saveUninitialized

Expand Down

0 comments on commit c32ad19

Please sign in to comment.