Welcome Guest, Not a member yet? Register   Sign In
CI Session problem

There's a lot more time to gain by blocking automatic writes.

Every time you update a session variable, the session library calls sess_write() to update the session record. In my MY_Session, I have blocked that, instead, I manually call sess_write() at the end of a page request, of when redirecting. This reduces the session I/O to a single read at the beginning, and a single write at the end. If you use the session library a lot, chances are that with this modification the database is quicker than your solution now (offcourse, implementing this AND memory tables would make it even faster).

You have to be careful with MEMORY tables. Space occupied by deleted records is only reclaimed when you delete the table. If you have lots of visitors, even if you have an agressive garbage collection setting, you could end up using all your memory, or hitting the max_heap_size setting (default 16M) so you can't create any new session records anymore.

Theme © iAndrew 2016 - Forum software by © MyBB