dce-session
is a generic session manager (not exclusive to dce
, can be integrated into any project), including basic session management, user session management, connection session management, self-regenerating session management, and the implementation of all the aforementioned session managers in the Redis version.
Basic session management traits mainly include some basic session storage interfaces, such as get
, set
, del
, etc. Some of them with the silent_
prefix indicate that this interface has silent and non-silent versions, where the non-silent version automatically touch
(update session expiration time). There are also some interfaces starting with cloned_
, used to handle some old sessions when regenerating sessions.
User session management traits encapsulate basic user session management interfaces, such as user
, login
, logout
, etc.
Connection session management traits are used to handle session management for long connections.
The self-regenerating session manager is used to automatically regenerate a new ID for a session after a certain period of time, even if the session has not expired, to enhance session security.
Abbreviation Notes
- TTG: Time To Generate, time when sid is generated
- SFR: Should-Regenerating-Sid timeout duration
- OJS: Old session delayed destruction duration
- CIJS: Duration of inactivity to judge when a new session should be destroyed
RedisSession
is a built-in implementation of session management in dce-session
, implementing the aforementioned "basic", "user", and "connection" session features, and can select which features to enable through control feature switches.
For complete usage examples, please refer to the files prefixed with
session_
in the src directory. For more comprehensive documentation, click here.