helpers/CacheManagerHelper.php
private static function findCaches(array $cachesNames = [])
    {
        $caches = [];
        $components = Yii::$app->getComponents();
        $findAll = ($cachesNames === []);
        
        foreach ($components as $name => $component) {
            if (!$findAll && !in_array($name, $cachesNames, true)) {
                continue;
            }
            
            if ($component instanceof CacheInterface) {
                $caches[$name] = get_class($component);
            } elseif (is_array($component) && isset($component['class']) && self::isCacheClass($component['class'])) {
                $caches[$name] = $component['class'];
            } elseif (is_string($component) && self::isCacheClass($component)) {
                $caches[$name] = $component;
            } elseif ($component instanceof \Closure) {
                $cache = Yii::$app->get($name);
                if (self::isCacheClass($cache)) {
                    $cacheClass = get_class($cache);
                    $caches[$name] = $cacheClass;
                }
            }
        }
        
        return $caches;
    }
private static function findCaches(array $cachesNames = [])
    {
        $caches = [];
        $components = Yii::$app->getComponents();
        $findAll = ($cachesNames === []);
        
        foreach ($components as $name => $component) {
            if (!$findAll && !in_array($name, $cachesNames, true)) {
                continue;
            }
            
            if ($component instanceof CacheInterface) {
                $caches[$name] = get_class($component);
            } elseif (is_array($component) && isset($component['class']) && self::isCacheClass($component['class'])) {
                $caches[$name] = $component['class'];
            } elseif (is_string($component) && self::isCacheClass($component)) {
                $caches[$name] = $component;
            } elseif ($component instanceof \Closure) {
                $cache = Yii::$app->get($name);
                if (self::isCacheClass($cache)) {
                    $cacheClass = get_class($cache);
                    $caches[$name] = $cacheClass;
                }
            }
        }
        
        return $caches;
    }
private static function findCaches ( array $ cachesNames = [ ] ) { $ caches = [ ] ; $ components = Yii :: $ app -> getComponents ( ) ; $ findAll = ( $ cachesNames === [ ] ) ; foreach ( $ components as $ name => $ component ) { if ( ! $ findAll && ! in_array ( $ name , $ cachesNames , true ) ) { continue ; } if ( $ component instanceof CacheInterface ) { $ caches [ $ name ] = get_class ( $ component ) ; } elseif ( is_array ( $ component ) && isset ( $ component [ 'class' ] ) && self :: isCacheClass ( $ component [ 'class' ] ) ) { $ caches [ $ name ] = $ component [ 'class' ] ; } elseif ( is_string ( $ component ) && self :: isCacheClass ( $ component ) ) { $ caches [ $ name ] = $ component ; } elseif ( $ component instanceof \ Closure ) { $ cache = Yii :: $ app -> get ( $ name ) ; if ( self :: isCacheClass ( $ cache ) ) { $ cacheClass = get_class ( $ cache ) ; $ caches [ $ name ] = $ cacheClass ; } } } return $ caches ; }
Returns array of caches in the system, keys are cache components names, values are class names.

@param array $cachesNames caches to be found

@return array
Returns array of caches in the system keys are cache components names values are class names .