Debugging an issue about login in a Moodle system that I'm managing I was surprised to find records into mdl_sessions table when I have configured into config.php to use Redis as the session handler like it is described into the config-dist.php file according to my infrastructure (below just the example code described into config-dist.php):
// Redis session handler (requires redis server and redis extension): $CFG->session_handler_class = '\core\session\redis'; $CFG->session_redis_host = '127.0.0.1'; $CFG->session_redis_port = 6379; // Optional.
Into the lib/classes/sessions/manager.php I found next comment:
* The session must exist both in session table and actual * session backend and the session must not be timed out.
And all significant function for manage sessions (touch_session, terminate_current, start, session_exists, login_user, kill_user_sessions, kill_session, initialise_user_session, ..) are using the 'sessions' table into the DB directly, instead to use the handler (stored, once has been initialized, into the attribute $handler).
So, my question is: have the sense to have 2 different points for manage sessions?