Welcome Guest, Not a member yet? Register   Sign In
Using Session with a lot of AJAX
#2

Yikes! The doc is wrong! session_destroy() or $session->destroy() will do exactly that, destroy the session and log out the user. You should call session_write_close() to save the session and release the lock. There's even a paragraph almost at the end of the page that says to use session_write_close():
Quote:Important

Only MySQL and PostgreSQL databases are officially supported, due to lack of advisory locking mechanisms on other platforms. Using sessions without locks can cause all sorts of problems, especially with heavy usage of AJAX, and we will not support such cases. Use session_write_close() after you’ve done processing session data if you’re having performance issues.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
Using Session with a lot of AJAX - by Jag81 - 12-08-2021, 09:33 AM
RE: Using Session with a lot of AJAX - by includebeer - 12-08-2021, 05:14 PM
RE: Using Session with a lot of AJAX - by kenjis - 12-11-2021, 06:07 PM
RE: Using Session with a lot of AJAX - by kenjis - 12-08-2021, 06:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB