public function add($cacheKey, $content, $status = 200, $headers = [], $expires = Cache::HOUR)
    {
        $file = File::create();
        $file->setStatus($status);
        $file->setContent($content);
        $file->setRoute($cacheKey);
        $file->setHeaders($headers);
        if ($expires > 0) {
            $file->setExpires(time() + $expires);
        } else {
            $file->setExpires($expires);
        }
        $this->fileHandler->write($file);
    }
public function add($cacheKey, $content, $status = 200, $headers = [], $expires = Cache::HOUR)
    {
        $file = File::create();
        $file->setStatus($status);
        $file->setContent($content);
        $file->setRoute($cacheKey);
        $file->setHeaders($headers);
        if ($expires > 0) {
            $file->setExpires(time() + $expires);
        } else {
            $file->setExpires($expires);
        }
        $this->fileHandler->write($file);
    }
public function add ( $ cacheKey , $ content , $ status = 200 , $ headers = [ ] , $ expires = Cache :: HOUR ) { $ file = File :: create ( ) ; $ file -> setStatus ( $ status ) ; $ file -> setContent ( $ content ) ; $ file -> setRoute ( $ cacheKey ) ; $ file -> setHeaders ( $ headers ) ; if ( $ expires > 0 ) { $ file -> setExpires ( time ( ) + $ expires ) ; } else { $ file -> setExpires ( $ expires ) ; } $ this -> fileHandler -> write ( $ file ) ; }
Adds a cache entry with a given key, content and for a set amount of time
The time by default for the cache is an hour

@param       $cacheKey
@param       $content
@param int   $status
@param array $headers
@param int   $expires

@throws CacheFileSystemException
Adds a cache entry with a given key content and for a set amount of time The time by default for the cache is an hour