Skip to content
Permalink
Browse files

Use the new Cache::registry() method within the Cache class.

  • Loading branch information...
dakota committed Sep 10, 2015
1 parent d07708c commit 313318abf6a32345b9d5f88d8f13d82196ad7290
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/Cache/Cache.php
@@ -135,9 +135,7 @@ public static function registry()
*/
protected static function _buildEngine($name)
{
if (empty(static::$_registry)) {
static::$_registry = new CacheRegistry();
}
$registry = static::registry();
if (empty(static::$_config[$name]['className'])) {
throw new InvalidArgumentException(
@@ -146,7 +144,7 @@ protected static function _buildEngine($name)
}
$config = static::$_config[$name];
static::$_registry->load($name, $config);
$registry->load($name, $config);
if (!empty($config['groups'])) {
foreach ($config['groups'] as $group) {
@@ -172,12 +170,14 @@ public static function engine($config)
return new NullEngine();
}
if (isset(static::$_registry->{$config})) {
return static::$_registry->{$config};
$registry = static::registry();
if (isset($registry->{$config})) {
return $registry->{$config};
}
static::_buildEngine($config);
return static::$_registry->{$config};
return $registry->{$config};
}
/**

0 comments on commit 313318a

Please sign in to comment.
You can’t perform that action at this time.