original_string: public function distributeExpire(EventInterface $event)/*# : bool */
      {
          $dist = $this->distribution;
          $item = $event->getParam('item');
  
          if ($item instanceof CacheItemExtendedInterface) {
              // expire ttl
              $ttl = $item->getExpiration()->getTimestamp() - time();
  
              // percentage
              $percent = (rand(0, $dist * 2) - $dist) * 0.001;
  
              // new expire ttl
              $new_ttl = (int) round($ttl + $ttl * $percent);
              $item->expiresAfter($new_ttl);
          }
  
          return true;
      }
code: public function distributeExpire(EventInterface $event)/*# : bool */
      {
          $dist = $this->distribution;
          $item = $event->getParam('item');
  
          if ($item instanceof CacheItemExtendedInterface) {
              // expire ttl
              $ttl = $item->getExpiration()->getTimestamp() - time();
  
              // percentage
              $percent = (rand(0, $dist * 2) - $dist) * 0.001;
  
              // new expire ttl
              $new_ttl = (int) round($ttl + $ttl * $percent);
              $item->expiresAfter($new_ttl);
          }
  
          return true;
      }
code_tokens: public function distributeExpire ( EventInterface $ event ) /*# : bool */ { $ dist = $ this -> distribution ; $ item = $ event -> getParam ( 'item' ) ; if ( $ item instanceof CacheItemExtendedInterface ) { // expire ttl $ ttl = $ item -> getExpiration ( ) -> getTimestamp ( ) - time ( ) ; // percentage $ percent = ( rand ( 0 , $ dist * 2 ) - $ dist ) * 0.001 ; // new expire ttl $ new_ttl = ( int ) round ( $ ttl + $ ttl * $ percent ) ; $ item -> expiresAfter ( $ new_ttl ) ; } return true ; }
docstring: Evenly distribute the expiration time
  
  @param  EventInterface $event
  @return bool
  @access public
docstring_tokens: Evenly distribute the expiration time