mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
MDL-13237, MDL-13661 - fixing rcache regression, sorry :-(; merged from MOODLE_19_STABLE
This commit is contained in:
parent
f4fa5a636c
commit
6b7af68720
@ -2536,7 +2536,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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user