original_string: public function delete( $id = null, $attributes = array(), $search = false )
      {
          $metaStorage = $this->getMetaDataStorage();
          $metaStorage->lock();
  
          $metaData = $metaStorage->restoreMetaData();
  
          $deletedIds = array();
          foreach ( $this->storageStack as $storageConf )
          {
              $deletedIds = array_merge(
                  $deletedIds,
                  call_user_func(
                      array(
                          $this->properties['options']->replacementStrategy,
                          'delete'
                      ),
                      $storageConf,
                      $metaData,
                      $id,
                      $attributes,
                      $search
                  )
              );
          }
  
          $metaStorage->storeMetaData( $metaData );
          $metaStorage->unlock();
  
          return array_unique( $deletedIds );
      }
code: public function delete( $id = null, $attributes = array(), $search = false )
      {
          $metaStorage = $this->getMetaDataStorage();
          $metaStorage->lock();
  
          $metaData = $metaStorage->restoreMetaData();
  
          $deletedIds = array();
          foreach ( $this->storageStack as $storageConf )
          {
              $deletedIds = array_merge(
                  $deletedIds,
                  call_user_func(
                      array(
                          $this->properties['options']->replacementStrategy,
                          'delete'
                      ),
                      $storageConf,
                      $metaData,
                      $id,
                      $attributes,
                      $search
                  )
              );
          }
  
          $metaStorage->storeMetaData( $metaData );
          $metaStorage->unlock();
  
          return array_unique( $deletedIds );
      }
code_tokens: public function delete ( $ id = null , $ attributes = array ( ) , $ search = false ) { $ metaStorage = $ this -> getMetaDataStorage ( ) ; $ metaStorage -> lock ( ) ; $ metaData = $ metaStorage -> restoreMetaData ( ) ; $ deletedIds = array ( ) ; foreach ( $ this -> storageStack as $ storageConf ) { $ deletedIds = array_merge ( $ deletedIds , call_user_func ( array ( $ this -> properties [ 'options' ] -> replacementStrategy , 'delete' ) , $ storageConf , $ metaData , $ id , $ attributes , $ search ) ) ; } $ metaStorage -> storeMetaData ( $ metaData ) ; $ metaStorage -> unlock ( ) ; return array_unique ( $ deletedIds ) ; }
docstring: Deletes an item from the stack.
  
  This method deletes an item from the cache stack. The item will
  afterwards no more be stored in any of the inner cache storages. Giving
  the ID of the cache item will delete exactly 1 desired item. Giving an
  attribute array, describing the desired item in more detail, can speed
  up the deletion in some caches.
  
  Giving null as the ID and just an attribibute array, with the $search
  attribute in addition, will delete *all* items that comply to the
  attributes from all storages. This might be much slower than just
  deleting a single item.
  
  Deleting items from a cache stack is not recommended at all. Instead,
  items should expire on their own or be overwritten with more actual
  data.
  
  The method returns an array containing all deleted item IDs.
  
  @param string $id
  @param array $attributes
  @param bool $search
  @return array(string)
docstring_tokens: Deletes an item from the stack .