MDL-13237, MDL-13661 - fixing rcache regression, sorry :-(; merged from MOODLE_19_STABLE
This commit is contained in:
+4
-1
@@ -2328,7 +2328,10 @@ function rcache_set($table, $id, $rec) {
|
||||
$rcache->data[$table] = array();
|
||||
}
|
||||
if (!isset($rcache->data[$table][$id]) and count($rcache->data[$table]) > $CFG->intcachemax) {
|
||||
array_shift($rcache->data[$table]);
|
||||
// release oldes record
|
||||
reset($rcache->data[$table]);
|
||||
$key = key($rcache->data[$table]);
|
||||
unset($rcache->data[$table][$key]);
|
||||
}
|
||||
$rcache->data[$table][$id] = clone($rec);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user