original_string: protected function addCache(Application $app)
      {
          $app['descriptor.cache'] = $app->share(
              function () {
                  $cache = new Filesystem();
                  $cache->setOptions(
                      array(
                           'namespace' => 'phpdoc-cache',
                           'cache_dir' => sys_get_temp_dir(),
                      )
                  );
                  $plugin = new SerializerPlugin();
  
                  if (extension_loaded('igbinary')) {
                      $options = new PluginOptions();
                      $options->setSerializer('igbinary');
  
                      $plugin->setOptions($options);
                  }
  
                  $cache->addPlugin($plugin);
  
                  return $cache;
              }
          );
      }
code: protected function addCache(Application $app)
      {
          $app['descriptor.cache'] = $app->share(
              function () {
                  $cache = new Filesystem();
                  $cache->setOptions(
                      array(
                           'namespace' => 'phpdoc-cache',
                           'cache_dir' => sys_get_temp_dir(),
                      )
                  );
                  $plugin = new SerializerPlugin();
  
                  if (extension_loaded('igbinary')) {
                      $options = new PluginOptions();
                      $options->setSerializer('igbinary');
  
                      $plugin->setOptions($options);
                  }
  
                  $cache->addPlugin($plugin);
  
                  return $cache;
              }
          );
      }
code_tokens: protected function addCache ( Application $ app ) { $ app [ 'descriptor.cache' ] = $ app -> share ( function ( ) { $ cache = new Filesystem ( ) ; $ cache -> setOptions ( array ( 'namespace' => 'phpdoc-cache' , 'cache_dir' => sys_get_temp_dir ( ) , ) ) ; $ plugin = new SerializerPlugin ( ) ; if ( extension_loaded ( 'igbinary' ) ) { $ options = new PluginOptions ( ) ; $ options -> setSerializer ( 'igbinary' ) ; $ plugin -> setOptions ( $ options ) ; } $ cache -> addPlugin ( $ plugin ) ; return $ cache ; } ) ; }
docstring: Adds the caching mechanism to the dependency injection container with key 'descriptor.cache'.
  
  @param Application $app
  
  @return void
docstring_tokens: Adds the caching mechanism to the dependency injection container with key descriptor . cache .