original_string: protected function _create($class, $alias, $config)
      {
          if (is_object($class)) {
              $instance = $class;
          }
  
          unset($config['className']);
          if (!isset($instance)) {
              $instance = new $class($config);
          }
  
          if (!($instance instanceof CacheEngine)) {
              throw new RuntimeException(
                  'Cache engines must use Cake\Cache\CacheEngine as a base class.'
              );
          }
  
          if (!$instance->init($config)) {
              throw new RuntimeException(
                  sprintf('Cache engine %s is not properly configured.', get_class($instance))
              );
          }
  
          $config = $instance->getConfig();
          if ($config['probability'] && time() % $config['probability'] === 0) {
              $instance->gc();
          }
  
          return $instance;
      }
code: protected function _create($class, $alias, $config)
      {
          if (is_object($class)) {
              $instance = $class;
          }
  
          unset($config['className']);
          if (!isset($instance)) {
              $instance = new $class($config);
          }
  
          if (!($instance instanceof CacheEngine)) {
              throw new RuntimeException(
                  'Cache engines must use Cake\Cache\CacheEngine as a base class.'
              );
          }
  
          if (!$instance->init($config)) {
              throw new RuntimeException(
                  sprintf('Cache engine %s is not properly configured.', get_class($instance))
              );
          }
  
          $config = $instance->getConfig();
          if ($config['probability'] && time() % $config['probability'] === 0) {
              $instance->gc();
          }
  
          return $instance;
      }
code_tokens: protected function _create ( $ class , $ alias , $ config ) { if ( is_object ( $ class ) ) { $ instance = $ class ; } unset ( $ config [ 'className' ] ) ; if ( ! isset ( $ instance ) ) { $ instance = new $ class ( $ config ) ; } if ( ! ( $ instance instanceof CacheEngine ) ) { throw new RuntimeException ( 'Cache engines must use Cake\Cache\CacheEngine as a base class.' ) ; } if ( ! $ instance -> init ( $ config ) ) { throw new RuntimeException ( sprintf ( 'Cache engine %s is not properly configured.' , get_class ( $ instance ) ) ) ; } $ config = $ instance -> getConfig ( ) ; if ( $ config [ 'probability' ] && time ( ) % $ config [ 'probability' ] === 0 ) { $ instance -> gc ( ) ; } return $ instance ; }
docstring: Create the cache engine instance.
  
  Part of the template method for Cake\Core\ObjectRegistry::load()
  
  @param string|\Cake\Cache\CacheEngine $class The classname or object to make.
  @param string $alias The alias of the object.
  @param array $config An array of settings to use for the cache engine.
  @return \Cake\Cache\CacheEngine The constructed CacheEngine class.
  @throws \RuntimeException when an object doesn't implement the correct interface.
docstring_tokens: Create the cache engine instance .