MDL-36362 cache: added simpledata definition option

This commit is contained in:
Sam Hemelryk
2012-11-05 10:28:07 +13:00
parent 6109f2112c
commit 2e1e266c9a
5 changed files with 32 additions and 3 deletions
+3
View File
@@ -498,6 +498,9 @@ class cache implements cache_loader {
* @param stdClass|array $data
*/
protected function unref($data) {
if ($this->definition->uses_simple_data()) {
return $data;
}
// Check if it requires serialisation in order to produce a reference free copy.
if ($this->requires_serialisation($data)) {
// Damn, its going to have to be serialise.