Skip to content

Commit

Permalink
Avoid session timeouts with memcache backend as proposed by D. Carter…
Browse files Browse the repository at this point in the history
… via users mailing list
  • Loading branch information
thomascube committed Jul 23, 2013
1 parent a7fa90f commit 1a8cf64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_session.php
Expand Up @@ -333,9 +333,9 @@ public function mc_write($key, $vars)

$newvars = $oldvars !== null ? $this->_fixvars($vars, $oldvars) : $vars;

if ($newvars !== $oldvars || $ts - $this->changed > $this->lifetime / 2) {
if ($newvars !== $oldvars || $ts - $this->changed > $this->lifetime / 3) {
return $this->memcache->set($key, serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $newvars)),
MEMCACHE_COMPRESSED, $this->lifetime);
MEMCACHE_COMPRESSED, $this->lifetime + 60);
}

return true;
Expand Down

0 comments on commit 1a8cf64

Please sign in to comment.