summaryrefslogtreecommitdiff
path: root/program/include/session.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-11-23 13:24:49 +0000
committerthomascube <thomas@roundcube.net>2008-11-23 13:24:49 +0000
commit29c64b0bdd3ee16532ed5f390044e5d5bec5bdec (patch)
treeab8f1d5b975cc83c15b1cdf3b98a01687ae53d22 /program/include/session.inc
parent69ad1e81240435f79dde895200bc3ddd9aa3aebf (diff)
Also clean cache table when removing old messages from cache
Diffstat (limited to 'program/include/session.inc')
-rw-r--r--program/include/session.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/include/session.inc b/program/include/session.inc
index 3f01fcd53..f91a51a8c 100644
--- a/program/include/session.inc
+++ b/program/include/session.inc
@@ -125,12 +125,12 @@ function rcube_sess_gc($maxlifetime)
return false;
}
- if ($rcmail->config->get('enable_caching'))
- rcmail_message_cache_gc();
-
// just delete all expired sessions
$DB->query("DELETE FROM " . get_table_name('session') . "
- WHERE changed < " . $now);
+ WHERE changed < " . $DB->fromunixtime(time() - $maxlifetime));
+
+ if ($rcmail->config->get('enable_caching'))
+ rcmail_cache_gc();
rcmail_temp_gc();