MDL-40475 add alternative component cache location and other improvements
Improvements include: * Alternative location might be useful when server administrator wants to maintain a local copy of component cache instead of using shared $CFG->cachedir. * Component caching is now enabled in behat tests which should improve performance. * Standardised ignoring of component caching. * Fixed debug mode in ABORT_AFTER_CONFIG scripts. * General documentation improvements.
This commit is contained in:
@@ -34,6 +34,7 @@ if (function_exists('opcache_reset')) {
|
||||
|
||||
// Is not really necessary but adding it as is a CLI_SCRIPT.
|
||||
define('CLI_SCRIPT', true);
|
||||
define('CACHE_DISABLE_ALL', true);
|
||||
|
||||
// Basic functions.
|
||||
require_once(__DIR__ . '/../../../../lib/clilib.php');
|
||||
|
||||
@@ -84,6 +84,7 @@ define('BEHAT_UTIL', true);
|
||||
define('CLI_SCRIPT', true);
|
||||
define('ABORT_AFTER_CONFIG', true);
|
||||
define('NO_OUTPUT_BUFFERING', true);
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
ini_set('display_errors', '1');
|
||||
|
||||
@@ -32,6 +32,8 @@ if (function_exists('opcache_reset')) {
|
||||
opcache_reset();
|
||||
}
|
||||
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
require_once(__DIR__.'/../../../../lib/clilib.php');
|
||||
require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
|
||||
require_once(__DIR__.'/../../../../lib/testing/lib.php');
|
||||
|
||||
@@ -28,6 +28,8 @@ if (isset($_SERVER['REMOTE_ADDR'])) {
|
||||
die; // no access from web!
|
||||
}
|
||||
|
||||
define('IGNORE_COMPONENT_CACHE', true);
|
||||
|
||||
require_once(__DIR__.'/../../../../lib/clilib.php');
|
||||
require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
|
||||
require_once(__DIR__.'/../../../../lib/testing/lib.php');
|
||||
|
||||
Reference in New Issue
Block a user