Fix clearing the cache on object delete (#912)

This commit is contained in:
Aleksander Machniak 2012-08-02 13:01:10 +02:00
parent 95e4b5e270
commit 8fa4ddb8f0
2 changed files with 5 additions and 1 deletions

View file

@ -196,6 +196,10 @@ class kolab_storage_cache
*/ */
public function set($msguid, $object, $foldername = null) public function set($msguid, $object, $foldername = null)
{ {
if (!$msguid) {
return;
}
// delegate to another cache instance // delegate to another cache instance
if ($foldername && $foldername != $this->folder->name) { if ($foldername && $foldername != $this->folder->name) {
kolab_storage::get_folder($foldername)->cache->set($msguid, $object); kolab_storage::get_folder($foldername)->cache->set($msguid, $object);

View file

@ -621,7 +621,7 @@ class kolab_storage_folder
} }
if ($success) { if ($success) {
$this->cache->set($result, false); $this->cache->set($msguid, false);
} }
return $success; return $success;