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);
    }
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);
    }
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 ) ; }
Attempt to update our cache file.
@return void
Attempt to update our cache file .