File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -268,6 +268,18 @@ req.session.reload(function(err) {
268268
269269#### Session.save()
270270
271+ Save the session back to the store, replacing the contents on the store with the
272+ contents in memory (though a store may do something else--consult the store's
273+ documentation for exact behavior).
274+
275+ This method is automatically called at the end of the HTTP response if the
276+ session data has been altered (though this behavior can be altered with various
277+ options in the middleware constructor). Because of this, typically this method
278+ does not need to be called.
279+
280+ There are some cases where it is useful to call this method, for example, long-
281+ lived requests or in WebSockets.
282+
271283``` js
272284req .session .save (function (err ) {
273285 // session saved
You can’t perform that action at this time.
0 commit comments