Merge branch 'wip-MDL-36386-m24' of git://github.com/samhemelryk/moodle

Conflicts:
	version.php
This commit is contained in:
Dan Poltawski
2012-11-07 09:33:47 +08:00
4 changed files with 33 additions and 10 deletions
+15
View File
@@ -453,4 +453,19 @@ class cache_helper {
public static function hash_key($key) {
return crc32($key);
}
/**
* Finds all definitions and updates them within the cache config file.
*
* @param bool $coreonly If set to true only core definitions will be updated.
*/
public static function update_definitions($coreonly = false) {
global $CFG;
// Include locallib
require_once($CFG->dirroot.'/cache/locallib.php');
// First update definitions
cache_config_writer::update_definitions($coreonly);
// Second reset anything we have already initialised to ensure we're all up to date.
cache_factory::reset();
}
}