|
|
@ -348,7 +348,14 @@ class rcube_cache_shared
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($this->type == 'memcache' || $this->type == 'apc') {
|
|
|
|
if ($this->type == 'memcache' || $this->type == 'apc') {
|
|
|
|
return $this->add_record($this->ckey($key), $data);
|
|
|
|
$result = $this->add_record($this->ckey($key), $data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// make sure index will be updated
|
|
|
|
|
|
|
|
if ($result && !array_key_exists($key, $this->cache_sums)) {
|
|
|
|
|
|
|
|
$this->cache_sums[$key] = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return $result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$key_exists = array_key_exists($key, $this->cache_sums);
|
|
|
|
$key_exists = array_key_exists($key, $this->cache_sums);
|
|
|
@ -531,11 +538,16 @@ class rcube_cache_shared
|
|
|
|
|
|
|
|
|
|
|
|
// Make sure index contains new keys
|
|
|
|
// Make sure index contains new keys
|
|
|
|
foreach ($this->cache as $key => $value) {
|
|
|
|
foreach ($this->cache as $key => $value) {
|
|
|
|
if ($value !== null) {
|
|
|
|
if ($value !== null && !in_array($key, $this->index)) {
|
|
|
|
if (array_search($key, $this->index) === false) {
|
|
|
|
|
|
|
|
$this->index[] = $key;
|
|
|
|
$this->index[] = $key;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// new keys added using self::write()
|
|
|
|
|
|
|
|
foreach ($this->cache_sums as $key => $value) {
|
|
|
|
|
|
|
|
if ($value === true && !in_array($key, $this->index)) {
|
|
|
|
|
|
|
|
$this->index[] = $key;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$data = serialize($this->index);
|
|
|
|
$data = serialize($this->index);
|
|
|
|