extends abstract class Phalcon\Cache\Backend
implements Phalcon\Cache\BackendInterface
Source on GitHub
Allows to cache output fragments, PHP data and raw data using an APC backend
use Phalcon\Cache\Backend\Apc;
use Phalcon\Cache\Frontend\Data as FrontData;
// Cache data for 2 days
$frontCache = new FrontData([
'lifetime' => 172800
]);
$cache = new Apc($frontCache, [
'prefix' => 'app-data'
]);
// Cache arbitrary data
$cache->save('my-data', [1, 2, 3, 4, 5]);
// G