classes/Cache.php
public static function using($driver){
      foreach((array)$driver as $key => $value){
          if(is_numeric($key)){
            $drv = $value;
            $conf = [];
          } else {
            $drv = $key;
            $conf = $value;
          }
          $class = 'Cache\\' . ucfirst(strtolower($drv));
          if(class_exists($class) && $class::valid()) {
            static::$driver = new $class($conf);
            return true;
          }
        }
       return false;
    }
public static function using($driver){
      foreach((array)$driver as $key => $value){
          if(is_numeric($key)){
            $drv = $value;
            $conf = [];
          } else {
            $drv = $key;
            $conf = $value;
          }
          $class = 'Cache\\' . ucfirst(strtolower($drv));
          if(class_exists($class) && $class::valid()) {
            static::$driver = new $class($conf);
            return true;
          }
        }
       return false;
    }
public static function using ( $ driver ) { foreach ( ( array ) $ driver as $ key => $ value ) { if ( is_numeric ( $ key ) ) { $ drv = $ value ; $ conf = [ ] ; } else { $ drv = $ key ; $ conf = $ value ; } $ class = 'Cache\\' . ucfirst ( strtolower ( $ drv ) ) ; if ( class_exists ( $ class ) && $ class :: valid ( ) ) { static :: $ driver = new $ class ( $ conf ) ; return true ; } } return false ; }
Load cache drivers with a FCFS strategy

@method using
@param  mixed $driver can be a single driver name string, an array of driver names or a map [ driver_name => driver_options array ]
@return bool   true if a driver was loaded
@example

Cache::using('redis');
Cache::using(['redis','files','memory']); // Prefer "redis" over "files" over "memory" caching
Cache::using([
'redis' => [
'host'   => '127.0.0.1',
'prefix' => 'mycache',
],
'files' => [
'cache_dir' => '/tmp',
],
'memory'
]);
Load cache drivers with a FCFS strategy