public function findCache(string $name='')
  {
    if ( empty($name) ) {
      # Take first available
      $cache = \reset($this->caches);
      if ($cache === false)
        return null;
    } else {
      # Attempt to find the cache from the list
      $cache = ( $this->caches[\strtolower($name)] ?? null);
    }

    return $cache;
  }
public function findCache(string $name='')
  {
    if ( empty($name) ) {
      # Take first available
      $cache = \reset($this->caches);
      if ($cache === false)
        return null;
    } else {
      # Attempt to find the cache from the list
      $cache = ( $this->caches[\strtolower($name)] ?? null);
    }

    return $cache;
  }
public function findCache ( string $ name = '' ) { if ( empty ( $ name ) ) { # Take first available $ cache = \ reset ( $ this -> caches ) ; if ( $ cache === false ) return null ; } else { # Attempt to find the cache from the list $ cache = ( $ this -> caches [ \ strtolower ( $ name ) ] ?? null ) ; } return $ cache ; }
Find a Cache based on name

If the $name is empty/null we'll return the 1st cache in the internal list
(if there is one)

@param      string  $name   Name of the cache (from Config)

@return     null | PdoConnection
Find a Cache based on name