As everyone knows, Joomla support different types of session handler (file, database, none, memcached etc). When users set up session handler to "none" we expect that there will be no more queries to database to handle session data.
But when you set session handler to "none", you will see that your #__session
still has data and there are queries to this table on every page hit.
In /libraries/cms/application/cms.php
you can see function checkSession()
.
/**
* Checks the user session.
*
* If the session record doesn't exist, initialise it.
* If session is new, create session variables
*
* @return void
*
* @since 3.2
*/
In this function you can see database queries which are uses to select and insert to #__session table.
If you simple add "return;" statement site will be still full functional because of session handler setted to "none".
Why do we need this function? Why this function don't check what type of session handler do we use? Is this behavior is necessary or my solution with adding return in beginning of function is normal?