original_string: public function updateCache()
      {
          if ($this->updateAttempted) {
              return;
          }
          $this->updateAttempted = true;
  
          $this->metadata = $this->downloadMetadata();
          if ($this->metadata === null) {
              return;
          }
  
          $expires = time() + 24*60*60; // Default expires in one day
  
          if ($this->metadata->validUntil !== null && $this->metadata->validUntil < $expires) {
              $expires = $this->metadata->validUntil;
          }
  
          $metadataSerialized = serialize($this->metadata);
  
          $this->aggregator->addCacheItem($this->cacheId, $metadataSerialized, $expires, $this->cacheTag);
      }
code: public function updateCache()
      {
          if ($this->updateAttempted) {
              return;
          }
          $this->updateAttempted = true;
  
          $this->metadata = $this->downloadMetadata();
          if ($this->metadata === null) {
              return;
          }
  
          $expires = time() + 24*60*60; // Default expires in one day
  
          if ($this->metadata->validUntil !== null && $this->metadata->validUntil < $expires) {
              $expires = $this->metadata->validUntil;
          }
  
          $metadataSerialized = serialize($this->metadata);
  
          $this->aggregator->addCacheItem($this->cacheId, $metadataSerialized, $expires, $this->cacheTag);
      }
code_tokens: public function updateCache ( ) { if ( $ this -> updateAttempted ) { return ; } $ this -> updateAttempted = true ; $ this -> metadata = $ this -> downloadMetadata ( ) ; if ( $ this -> metadata === null ) { return ; } $ expires = time ( ) + 24 * 60 * 60 ; // Default expires in one day if ( $ this -> metadata -> validUntil !== null && $ this -> metadata -> validUntil < $ expires ) { $ expires = $ this -> metadata -> validUntil ; } $ metadataSerialized = serialize ( $ this -> metadata ) ; $ this -> aggregator -> addCacheItem ( $ this -> cacheId , $ metadataSerialized , $ expires , $ this -> cacheTag ) ; }
docstring: Attempt to update our cache file.
  @return void
docstring_tokens: Attempt to update our cache file .