original_string: private function autoPruneExpiredEntries()
      {
          if (0 === $this->options['prune_threshold']) {
              return;
          }
  
          $item = $this->cache->getItem(self::COUNTER_KEY);
          $counter = (int) $item->get();
  
          if ($counter > $this->options['prune_threshold']) {
              $this->prune();
              $counter = 0;
          } else {
              ++$counter;
          }
  
          $item->set($counter);
  
          $this->cache->saveDeferred($item);
      }
code: private function autoPruneExpiredEntries()
      {
          if (0 === $this->options['prune_threshold']) {
              return;
          }
  
          $item = $this->cache->getItem(self::COUNTER_KEY);
          $counter = (int) $item->get();
  
          if ($counter > $this->options['prune_threshold']) {
              $this->prune();
              $counter = 0;
          } else {
              ++$counter;
          }
  
          $item->set($counter);
  
          $this->cache->saveDeferred($item);
      }
code_tokens: private function autoPruneExpiredEntries ( ) { if ( 0 === $ this -> options [ 'prune_threshold' ] ) { return ; } $ item = $ this -> cache -> getItem ( self :: COUNTER_KEY ) ; $ counter = ( int ) $ item -> get ( ) ; if ( $ counter > $ this -> options [ 'prune_threshold' ] ) { $ this -> prune ( ) ; $ counter = 0 ; } else { ++ $ counter ; } $ item -> set ( $ counter ) ; $ this -> cache -> saveDeferred ( $ item ) ; }
docstring: Increases a counter every time an item is stored to the cache and then
  prunes expired cache entries if a configurable threshold is reached.
  This only happens during write operations so cache retrieval is not
  slowed down.
docstring_tokens: Increases a counter every time an item is stored to the cache and then prunes expired cache entries if a configurable threshold is reached . This only happens during write operations so cache retrieval is not slowed down .