MDL-43033 cache: added stats logging to set_many methods

This commit is contained in:
Sam Hemelryk 2013-11-27 11:41:05 +13:00
parent 4bbbd50202
commit 7ac884d457

View file

@ -647,10 +647,11 @@ class cache implements cache_loader {
$this->static_acceleration_set($data[$key]['key'], $value);
}
}
if ($this->perfdebug) {
cache_helper::record_cache_set($this->storetype, $this->definition->get_id());
$successfullyset = $this->store->set_many($data);
if ($this->perfdebug && $successfullyset) {
cache_helper::record_cache_set($this->storetype, $this->definition->get_id(), $successfullyset);
}
return $this->store->set_many($data);
return $successfullyset;
}
/**
@ -2037,10 +2038,11 @@ class cache_session extends cache {
'value' => $value
);
}
if ($this->perfdebug) {
cache_helper::record_cache_set($this->storetype, $definitionid);
$successfullyset = $this->get_store()->set_many($data);
if ($this->perfdebug && $successfullyset) {
cache_helper::record_cache_set($this->storetype, $definitionid, $successfullyset);
}
return $this->get_store()->set_many($data);
return $successfullyset;
}
/**