original_string: public function getCache()
      {
          if (null === self::$cache) {
              if (!empty($this->appConfig['cache']['driver'])) {
                  // Options definition.
                  if (empty($this->appConfig['cache']['options'])) {
                      $options = array();
                  } else {
                      $options = $this->appConfig['cache']['options'];
                  }
  
                  // Driver definition.
                  if ('memcached' !== $this->appConfig['cache']['driver']) {
                      $className = $this->appConfig['cache']['driver'];
                  } else {
                      $className = '\Towel\Cache\TowelMemcached';
                  }
  
                  // Driver instantiation
                  $cacheDriver = new $className();
                  $cacheDriver->setOptions($options);
              }
  
              self::$cache = new TowelCache($cacheDriver);
          }
  
          return self::$cache;
      }
code: public function getCache()
      {
          if (null === self::$cache) {
              if (!empty($this->appConfig['cache']['driver'])) {
                  // Options definition.
                  if (empty($this->appConfig['cache']['options'])) {
                      $options = array();
                  } else {
                      $options = $this->appConfig['cache']['options'];
                  }
  
                  // Driver definition.
                  if ('memcached' !== $this->appConfig['cache']['driver']) {
                      $className = $this->appConfig['cache']['driver'];
                  } else {
                      $className = '\Towel\Cache\TowelMemcached';
                  }
  
                  // Driver instantiation
                  $cacheDriver = new $className();
                  $cacheDriver->setOptions($options);
              }
  
              self::$cache = new TowelCache($cacheDriver);
          }
  
          return self::$cache;
      }
code_tokens: public function getCache ( ) { if ( null === self :: $ cache ) { if ( ! empty ( $ this -> appConfig [ 'cache' ] [ 'driver' ] ) ) { // Options definition. if ( empty ( $ this -> appConfig [ 'cache' ] [ 'options' ] ) ) { $ options = array ( ) ; } else { $ options = $ this -> appConfig [ 'cache' ] [ 'options' ] ; } // Driver definition. if ( 'memcached' !== $ this -> appConfig [ 'cache' ] [ 'driver' ] ) { $ className = $ this -> appConfig [ 'cache' ] [ 'driver' ] ; } else { $ className = '\Towel\Cache\TowelMemcached' ; } // Driver instantiation $ cacheDriver = new $ className ( ) ; $ cacheDriver -> setOptions ( $ options ) ; } self :: $ cache = new TowelCache ( $ cacheDriver ) ; } return self :: $ cache ; }
docstring: Instantiate Cache driver
  @return \Towel\Cache\CacheInterface
docstring_tokens: Instantiate Cache driver