mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
MDL-43033 cache: added stats logging to set_many methods
This commit is contained in:
parent
4bbbd50202
commit
7ac884d457
1 changed files with 8 additions and 6 deletions
14
cache/classes/loaders.php
vendored
14
cache/classes/loaders.php
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue