CRemoteImage.php
public function updateCacheDetails()
    {
        $date         = $this->http->getDate(time());
        $maxAge       = $this->http->getMaxAge($this->defaultMaxAge);
        $lastModified = $this->http->getLastModified();

        $this->cache['Date']    = gmdate("D, d M Y H:i:s T", $date);
        $this->cache['Max-Age'] = $maxAge;

        if ($lastModified) {
            $this->cache['Last-Modified'] = gmdate("D, d M Y H:i:s T", $lastModified);
        }

        file_put_contents($this->fileJson, json_encode($this->cache));
        return $this->fileName;
    }
public function updateCacheDetails()
    {
        $date         = $this->http->getDate(time());
        $maxAge       = $this->http->getMaxAge($this->defaultMaxAge);
        $lastModified = $this->http->getLastModified();

        $this->cache['Date']    = gmdate("D, d M Y H:i:s T", $date);
        $this->cache['Max-Age'] = $maxAge;

        if ($lastModified) {
            $this->cache['Last-Modified'] = gmdate("D, d M Y H:i:s T", $lastModified);
        }

        file_put_contents($this->fileJson, json_encode($this->cache));
        return $this->fileName;
    }
public function updateCacheDetails ( ) { $ date = $ this -> http -> getDate ( time ( ) ) ; $ maxAge = $ this -> http -> getMaxAge ( $ this -> defaultMaxAge ) ; $ lastModified = $ this -> http -> getLastModified ( ) ; $ this -> cache [ 'Date' ] = gmdate ( "D, d M Y H:i:s T" , $ date ) ; $ this -> cache [ 'Max-Age' ] = $ maxAge ; if ( $ lastModified ) { $ this -> cache [ 'Last-Modified' ] = gmdate ( "D, d M Y H:i:s T" , $ lastModified ) ; } file_put_contents ( $ this -> fileJson , json_encode ( $ this -> cache ) ) ; return $ this -> fileName ; }
Got a 304 and updates cache with new age.

@return string as path to cached file.
Got a 304 and updates cache with new age .