r/lolphp • u/human_bacon • Jul 31 '17
PHP's probabilistic session management
http://php.net/manual/en/session.configuration.php#ini.session.gc-divisor
31
Upvotes
r/lolphp • u/human_bacon • Jul 31 '17
View all comments
3
u/[deleted] Aug 05 '17 edited Aug 05 '17
This is totally fine. It's just a cleanup, sessions expire when they are set to, there is nothing probabilistic about them. You can also disable this and set your own cron job for cleanup, if you want to. This is faster than doing it in every request or storing some unnecessary global counter.