A hardcoded value of 5% is way too often for a large scale site, especially if you're getting bursts of traffic.
I'd personally like to see the probability calculated more along the lines of
rand()/divisor < probability, so you can have a percentage of less than one, but greater than 0.
Without that kind of granularity, I've found it's actually more efficient to run a cron job every minute to clean up stale sessions.
Any opinions on the matter?
Allow session garbace collection percentage to be configured.
If this is to be included in CI, the config setting should be prefixed with sess_, but I'd like it better if it just uses what's set in php.ini.
Respect php.ini's values for calculating the probability of a session gc
@narfbg -- I updated it so it will respect both gc_probability, and gc_divisor, as well as support floats/fractions of a percent.
Looks good to me. :) You'll need to add a changelog entry for this though: user_guide_src/source/changelog.rst
updated the changelog
@narfbg My pleasure :)