some small refactorings and cleanup.

This commit is contained in:
Taylor Otwell
2011-10-22 23:25:07 -05:00
parent b71ecb4363
commit 32989d39c8
9 changed files with 45 additions and 51 deletions

View File

@@ -278,7 +278,9 @@ class Manager {
// driver must do its garbage collection manually. Alternatively, some
// drivers such as APC and Memcached are not required to manually
// clean up their sessions.
if (mt_rand(1, $config['sweepage'][1]) <= $config['sweepage'][0] and static::$driver instanceof Drivers\Sweeper)
$sweep = (mt_rand(1, $config['sweepage'][1]) <= $config['sweepage'][0]);
if ($sweep and static::$driver instanceof Drivers\Sweeper)
{
static::$driver->sweep(time() - ($config['lifetime'] * 60));
}