mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
rcache: cleanup, upgrade path, config options (MDL-8163)
record cache and caching schemes get a little cleanup, faster if()s and a nice set of config options. Users who've been using the internal cache get a nice upgrade too.
This commit is contained in:
parent
a5855a89bf
commit
bb931a61c6
5 changed files with 77 additions and 17 deletions
|
@ -510,6 +510,20 @@ function xmldb_main_upgrade($oldversion=0) {
|
|||
/// use get record set to iterate slower
|
||||
build_context_rel();
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2007011501) {
|
||||
if (!empty($CFG->enablerecordcache) && empty($CFG->rcache) &&
|
||||
// Note: won't force-load these settings into CFG
|
||||
// we don't need or want cache during the upgrade itself
|
||||
empty($CFG->cachetype) && empty($CFG->intcachemax)) {
|
||||
set_config('cachetype', 'internal');
|
||||
set_config('rcache', true);
|
||||
set_config('intcachemax', $CFG->enablerecordcache);
|
||||
unset_config('enablerecordcache');
|
||||
unset($CFG->enablerecordcache);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue