original_string: protected function _elementCache($name, $data, $options)
      {
          if (isset($options['cache']['key'], $options['cache']['config'])) {
              $cache = $options['cache'];
              $cache['key'] = 'element_' . $cache['key'];
  
              return $cache;
          }
  
          $plugin = null;
          list($plugin, $name) = $this->pluginSplit($name);
  
          $underscored = null;
          if ($plugin) {
              $underscored = Inflector::underscore($plugin);
          }
  
          $cache = $options['cache'];
          unset($options['cache'], $options['callbacks'], $options['plugin']);
          $keys = array_merge(
              [$underscored, $name],
              array_keys($options),
              array_keys($data)
          );
          $config = [
              'config' => $this->elementCache,
              'key' => implode('_', $keys)
          ];
          if (is_array($cache)) {
              $defaults = [
                  'config' => $this->elementCache,
                  'key' => $config['key']
              ];
              $config = $cache + $defaults;
          }
          $config['key'] = 'element_' . $config['key'];
  
          return $config;
      }
code: protected function _elementCache($name, $data, $options)
      {
          if (isset($options['cache']['key'], $options['cache']['config'])) {
              $cache = $options['cache'];
              $cache['key'] = 'element_' . $cache['key'];
  
              return $cache;
          }
  
          $plugin = null;
          list($plugin, $name) = $this->pluginSplit($name);
  
          $underscored = null;
          if ($plugin) {
              $underscored = Inflector::underscore($plugin);
          }
  
          $cache = $options['cache'];
          unset($options['cache'], $options['callbacks'], $options['plugin']);
          $keys = array_merge(
              [$underscored, $name],
              array_keys($options),
              array_keys($data)
          );
          $config = [
              'config' => $this->elementCache,
              'key' => implode('_', $keys)
          ];
          if (is_array($cache)) {
              $defaults = [
                  'config' => $this->elementCache,
                  'key' => $config['key']
              ];
              $config = $cache + $defaults;
          }
          $config['key'] = 'element_' . $config['key'];
  
          return $config;
      }
code_tokens: protected function _elementCache ( $ name , $ data , $ options ) { if ( isset ( $ options [ 'cache' ] [ 'key' ] , $ options [ 'cache' ] [ 'config' ] ) ) { $ cache = $ options [ 'cache' ] ; $ cache [ 'key' ] = 'element_' . $ cache [ 'key' ] ; return $ cache ; } $ plugin = null ; list ( $ plugin , $ name ) = $ this -> pluginSplit ( $ name ) ; $ underscored = null ; if ( $ plugin ) { $ underscored = Inflector :: underscore ( $ plugin ) ; } $ cache = $ options [ 'cache' ] ; unset ( $ options [ 'cache' ] , $ options [ 'callbacks' ] , $ options [ 'plugin' ] ) ; $ keys = array_merge ( [ $ underscored , $ name ] , array_keys ( $ options ) , array_keys ( $ data ) ) ; $ config = [ 'config' => $ this -> elementCache , 'key' => implode ( '_' , $ keys ) ] ; if ( is_array ( $ cache ) ) { $ defaults = [ 'config' => $ this -> elementCache , 'key' => $ config [ 'key' ] ] ; $ config = $ cache + $ defaults ; } $ config [ 'key' ] = 'element_' . $ config [ 'key' ] ; return $ config ; }
docstring: Generate the cache configuration options for an element.
  
  @param string $name Element name
  @param array $data Data
  @param array $options Element options
  @return array Element Cache configuration.
docstring_tokens: Generate the cache configuration options for an element .