Cache\Backend\File

Class Phalcon\Cache\Backend\File

extends abstract class Phalcon\Cache\Backend

implements Phalcon\Cache\BackendInterface

Source on GitHub

Allows to cache output fragments using a file backend

use Phalcon\Cache\Backend\File;
use Phalcon\Cache\Frontend\Output as FrontOutput;

// Cache the file for 2 days
$frontendOptions = [
    "lifetime" => 172800,
];

// Create an output cache
$frontCache = FrontOutput($frontOptions);

// Set the cache directory
$backendOptions = [
    "cacheDir" =>