Welcome Guest, Not a member yet? Register   Sign In
[Discussion] CI Session Library

Hello everybody. i currently developing chat system and i really thanks to CI developer that provide session library
and it was help me a lot to easier my project. I create how is online using this session library. but there i find some problem :
1. there is some record that never deleted from database. after i look deep at session class, session will only delete session record it they have both session id & the time is already expire. So when the client browse inr loose their cookies that hold session data browser, the record will never be deleted. i think session library should delete all expire session. not only from given session id from the cookies.
2. the ajax request also create & update session. i think session library be determine ajax request and normal request. and should not create & update session.

please comment if you have a different idea.


1. You could write your own garbage collection to make sure these sessions get removed as well. I never noticed this behaviour but it sounds plausible that if a user discards all his cookie, the session id gets lost thus the CI garbage collection doesn't trigger.
2. Take a look here

thanks noxie.
i notice CI also have a garbage collection probability that set only 5 (100 will delete all expire session).

and here a tips, hope it will help you a little. CI will only recognize variable that set to the session after reloading. but you can retrieve session that just you already set with call sess_read in session library.


Theme © iAndrew 2016 - Forum software by © MyBB