Session files |
Hi All,
I recently saw that I had a lot of session files and wonder if the amount being created by CodeIgniter is correct. So I installed a fresh version of 4.5.5 app starter and made the following changes:- Controller - home.php PHP Code: class Home extends BaseController View - welcome_message.php PHP Code: <!DOCTYPE html> CodeIgniter is creating a new session file every 5 minutes. I assume this is because of Code: public int $timeToUpdate = 300; Is this (many files) the expected behaviour? and if so does it make Code: $expiration = 7200; ELI5 ![]()
Here are 2 helper method's that I wrote to clear out session and log files in the writable folder.
Do not use on a live sever, for a live server please use a corn job to delete them. PHP Code: /** What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Hi InsiteFX,
Thanks for the code. I've also updated this line in app/Config/Session.php Code: public bool $regenerateDestroy = true;
Here is the info that I found on it.
cleanup php session files What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |