projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4fa5a6
)
MDL-13237, MDL-13661 - fixing rcache regression, sorry :-(; merged from MOODLE_19_STABLE
author
skodak
<skodak>
Mon, 25 Feb 2008 15:15:36 +0000
(15:15 +0000)
committer
skodak
<skodak>
Mon, 25 Feb 2008 15:15:36 +0000
(15:15 +0000)
lib/dmllib.php
patch
|
blob
|
history
diff --git
a/lib/dmllib.php
b/lib/dmllib.php
index 9f5e236ac8fc1e31fb5fa4d1314b4d28778a6d91..eae308b0d46e9d78c51573423acd82850eb3d511 100644
(file)
--- a/
lib/dmllib.php
+++ b/
lib/dmllib.php
@@
-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 {