MDL-25290 cache: Cache API integration with core

This commit is contained in:
Sam Hemelryk
2012-10-08 09:53:50 +13:00
parent 8139ad13a5
commit d6a1f63bdd
9 changed files with 199 additions and 0 deletions
+9
View File
@@ -138,6 +138,14 @@ if (!defined('PHPUNIT_TEST')) {
define('PHPUNIT_TEST', false);
}
// When set to true MUC (Moodle caching) will not use any of the defined or default stores.
// The Cache API will continue to function however this will force the use of the cache_store_dummy so all requests
// will be interacting with a static property and will never go to the proper cache stores.
// Useful if you need to avoid the stores for one reason or another.
if (!defined('NO_CACHE_STORES')) {
define('NO_CACHE_STORES', false);
}
// Servers should define a default timezone in php.ini, but if they don't then make sure something is defined.
// This is a quick hack. Ideally we should ask the admin for a value. See MDL-22625 for more on this.
if (function_exists('date_default_timezone_set') and function_exists('date_default_timezone_get')) {
@@ -468,6 +476,7 @@ require_once($CFG->libdir .'/sessionlib.php'); // All session and cookie re
require_once($CFG->libdir .'/editorlib.php'); // All text editor related functions and classes
require_once($CFG->libdir .'/messagelib.php'); // Messagelib functions
require_once($CFG->libdir .'/modinfolib.php'); // Cached information on course-module instances
require_once($CFG->dirroot.'/cache/lib.php'); // Cache API
// make sure PHP is not severly misconfigured
setup_validate_php_configuration();