extends abstract class Phalcon\Cache\Backend
implements Phalcon\Cache\BackendInterface
Source on GitHub
Allows to cache output fragments, PHP data or raw data to a MongoDb backend
use Phalcon\Cache\Backend\Mongo;
use Phalcon\Cache\Frontend\Base64;
// Cache data for 2 days
$frontCache = new Base64([
'lifetime' => 172800
]);
// Create a MongoDB cache
$cache = new Mongo($frontCache, [
'server' => "mongodb://localhost",
'db' => 'caches',
'collection' => 'imag