express-session启动警告deprecated undefined resave option

express-session deprecated undefined resave option; provide resave option at app.js:29:9

 express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at app.js:29:9

 

resave - forces session to be saved even when unmodified. (default: true)

resave ——重新保存:强制会话保存即使是未修改的。(默认值ture)

 

saveUninitialized - forces a session that is "uninitialized" to be saved to the store. A session is uninitialized when it is new but not modified. This is useful for implementing login sessions, reducing server storage usage, or complying with laws that require permission before setting a cookie. (default: true)

saveUninitialized——强制“未初始化”的会话保存到存储。一个会话未初始化的时候是新的,但不能修改。这对于实现登陆会话很有用,减少服务器存储的使用,或者服从一种在设置cookie之间的请求规则。。(默认值是true)

用有道翻译的真是晦涩难懂,我的理解是resave:假设每次登陆,就算会话存在也重新保存一次。

saveUninitialized :强制保存未初始化的会话到存储器

 

 

你可能感兴趣的:(express-session,resave)