original_string: public static function load_adhoc($mode, $component, $area, array $options = array()) {
          $id = 'adhoc/'.$component.'_'.$area;
          $definition = array(
              'mode' => $mode,
              'component' => $component,
              'area' => $area,
          );
          if (!empty($options['simplekeys'])) {
              $definition['simplekeys'] = $options['simplekeys'];
          }
          if (!empty($options['simpledata'])) {
              $definition['simpledata'] = $options['simpledata'];
          }
          if (!empty($options['persistent'])) {
              // Ahhh this is the legacy persistent option.
              $definition['staticacceleration'] = (bool)$options['persistent'];
          }
          if (!empty($options['staticacceleration'])) {
              $definition['staticacceleration'] = (bool)$options['staticacceleration'];
          }
          if (!empty($options['staticaccelerationsize'])) {
              $definition['staticaccelerationsize'] = (int)$options['staticaccelerationsize'];
          }
          if (!empty($options['overrideclass'])) {
              $definition['overrideclass'] = $options['overrideclass'];
          }
          if (!empty($options['sharingoptions'])) {
              $definition['sharingoptions'] = $options['sharingoptions'];
          }
          return self::load($id, $definition, null);
      }
code: public static function load_adhoc($mode, $component, $area, array $options = array()) {
          $id = 'adhoc/'.$component.'_'.$area;
          $definition = array(
              'mode' => $mode,
              'component' => $component,
              'area' => $area,
          );
          if (!empty($options['simplekeys'])) {
              $definition['simplekeys'] = $options['simplekeys'];
          }
          if (!empty($options['simpledata'])) {
              $definition['simpledata'] = $options['simpledata'];
          }
          if (!empty($options['persistent'])) {
              // Ahhh this is the legacy persistent option.
              $definition['staticacceleration'] = (bool)$options['persistent'];
          }
          if (!empty($options['staticacceleration'])) {
              $definition['staticacceleration'] = (bool)$options['staticacceleration'];
          }
          if (!empty($options['staticaccelerationsize'])) {
              $definition['staticaccelerationsize'] = (int)$options['staticaccelerationsize'];
          }
          if (!empty($options['overrideclass'])) {
              $definition['overrideclass'] = $options['overrideclass'];
          }
          if (!empty($options['sharingoptions'])) {
              $definition['sharingoptions'] = $options['sharingoptions'];
          }
          return self::load($id, $definition, null);
      }
code_tokens: public static function load_adhoc ( $ mode , $ component , $ area , array $ options = array ( ) ) { $ id = 'adhoc/' . $ component . '_' . $ area ; $ definition = array ( 'mode' => $ mode , 'component' => $ component , 'area' => $ area , ) ; if ( ! empty ( $ options [ 'simplekeys' ] ) ) { $ definition [ 'simplekeys' ] = $ options [ 'simplekeys' ] ; } if ( ! empty ( $ options [ 'simpledata' ] ) ) { $ definition [ 'simpledata' ] = $ options [ 'simpledata' ] ; } if ( ! empty ( $ options [ 'persistent' ] ) ) { // Ahhh this is the legacy persistent option. $ definition [ 'staticacceleration' ] = ( bool ) $ options [ 'persistent' ] ; } if ( ! empty ( $ options [ 'staticacceleration' ] ) ) { $ definition [ 'staticacceleration' ] = ( bool ) $ options [ 'staticacceleration' ] ; } if ( ! empty ( $ options [ 'staticaccelerationsize' ] ) ) { $ definition [ 'staticaccelerationsize' ] = ( int ) $ options [ 'staticaccelerationsize' ] ; } if ( ! empty ( $ options [ 'overrideclass' ] ) ) { $ definition [ 'overrideclass' ] = $ options [ 'overrideclass' ] ; } if ( ! empty ( $ options [ 'sharingoptions' ] ) ) { $ definition [ 'sharingoptions' ] = $ options [ 'sharingoptions' ] ; } return self :: load ( $ id , $ definition , null ) ; }
docstring: Creates an ah-hoc cache definition given the required params.
  
  Please note that when using an adhoc definition you cannot set any of the optional params.
  This is because we cannot guarantee consistent access and we don't want to mislead people into thinking that.
  
  @param int $mode One of cache_store::MODE_*
  @param string $component The component this definition relates to.
  @param string $area The area this definition relates to.
  @param array $options An array of options, available options are:
  - simplekeys : Set to true if the keys you will use are a-zA-Z0-9_
  - simpledata : Set to true if the type of the data you are going to store is scalar, or an array of scalar vars
  - overrideclass : The class to use as the loader.
  - staticacceleration : If set to true the cache will hold onto data passing through it.
  - staticaccelerationsize : Set it to an int to limit the size of the staticacceleration cache.
  @return cache_application|cache_session|cache_request
docstring_tokens: Creates an ah - hoc cache definition given the required params .