CImage.php
public function useCacheIfPossible($useCache = true)
    {
        if ($useCache && is_readable($this->cacheFileName)) {
            $fileTime   = filemtime($this->pathToImage);
            $cacheTime  = filemtime($this->cacheFileName);

            if ($fileTime <= $cacheTime) {
                if ($this->useCache) {
                    if ($this->verbose) {
                        $this->log("Use cached file.");
                        $this->log("Cached image filesize: " . filesize($this->cacheFileName) . " bytes.");
                    }
                    $this->output($this->cacheFileName, $this->outputFormat);
                } else {
                    $this->log("Cache is valid but ignoring it by intention.");
                }
            } else {
                $this->log("Original file is modified, ignoring cache.");
            }
        } else {
            $this->log("Cachefile does not exists or ignoring it.");
        }

        return $this;
    }
public function useCacheIfPossible($useCache = true)
    {
        if ($useCache && is_readable($this->cacheFileName)) {
            $fileTime   = filemtime($this->pathToImage);
            $cacheTime  = filemtime($this->cacheFileName);

            if ($fileTime <= $cacheTime) {
                if ($this->useCache) {
                    if ($this->verbose) {
                        $this->log("Use cached file.");
                        $this->log("Cached image filesize: " . filesize($this->cacheFileName) . " bytes.");
                    }
                    $this->output($this->cacheFileName, $this->outputFormat);
                } else {
                    $this->log("Cache is valid but ignoring it by intention.");
                }
            } else {
                $this->log("Original file is modified, ignoring cache.");
            }
        } else {
            $this->log("Cachefile does not exists or ignoring it.");
        }

        return $this;
    }
public function useCacheIfPossible ( $ useCache = true ) { if ( $ useCache && is_readable ( $ this -> cacheFileName ) ) { $ fileTime = filemtime ( $ this -> pathToImage ) ; $ cacheTime = filemtime ( $ this -> cacheFileName ) ; if ( $ fileTime <= $ cacheTime ) { if ( $ this -> useCache ) { if ( $ this -> verbose ) { $ this -> log ( "Use cached file." ) ; $ this -> log ( "Cached image filesize: " . filesize ( $ this -> cacheFileName ) . " bytes." ) ; } $ this -> output ( $ this -> cacheFileName , $ this -> outputFormat ) ; } else { $ this -> log ( "Cache is valid but ignoring it by intention." ) ; } } else { $ this -> log ( "Original file is modified, ignoring cache." ) ; } } else { $ this -> log ( "Cachefile does not exists or ignoring it." ) ; } return $ this ; }
Use cached version of image, if possible.

@param boolean $useCache is default true, set to false to avoid using cached object.

@return $this
Use cached version of image if possible .