mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Improve error used when a cache configuation fails to start.
Refs #5570
This commit is contained in:
parent
9553c029c4
commit
d7bc73b1e3
1 changed files with 6 additions and 1 deletions
|
@ -178,7 +178,12 @@ class Cache {
|
|||
}
|
||||
self::$_engines[$name] = new $cacheClass();
|
||||
if (!self::$_engines[$name]->init($config)) {
|
||||
throw new CacheException(__d('cake_dev', 'Cache engine %s is not properly configured.', $name));
|
||||
$msg = __d(
|
||||
'cake_dev',
|
||||
'Cache engine "%s" is not properly configured. Ensure required extensions are installed, and credentials/permissions are correct',
|
||||
$name
|
||||
);
|
||||
throw new CacheException($msg);
|
||||
}
|
||||
if (self::$_engines[$name]->settings['probability'] && time() % self::$_engines[$name]->settings['probability'] === 0) {
|
||||
self::$_engines[$name]->gc();
|
||||
|
|
Loading…
Reference in a new issue