Cache\Frontend\Data::afterRetrieve

public afterRetrieve (mixed $data) Unserializes data after retrieval

Cache\Frontend\Data::beforeStore

public beforeStore (mixed $data) Serializes data before storing them

Cache\Frontend\Data

implements Phalcon\Cache\FrontendInterface Source on GitHub Allows to cache native PHP data in a serialized form use Phalcon\Cache\Backend\File; use Phalcon\Cache\Frontend\Data; // Cache the files for 2 days using a Data frontend $frontCache = new Data(['lifetime' => 172800]); // Create the component that will cache "Data" to a 'File' backend // Set the cache file directory - important to keep the '/' at the end of // of the value for the folder $cache = new File($frontCache,

Cache\Frontend\Data::getLifetime

public getLifetime () Returns the cache lifetime

Cache\Frontend\Base64::getContent

public string getContent () Returns output cached content

Cache\Frontend\Base64::beforeStore

public string beforeStore (mixed $data) Serializes data before storing them

Cache\FrontendInterface::stop

abstract public stop () ...

Cache\Frontend\Base64::afterRetrieve

public mixed afterRetrieve (mixed $data) Unserializes data after retrieval

Cache\Frontend\Base64

implements Phalcon\Cache\FrontendInterface Source on GitHub Allows to cache data converting/deconverting them to base64. This adapter uses the base64_encode/base64_decode PHP’s functions <?php // Cache the files for 2 days using a Base64 frontend $frontCache = new \Phalcon\Cache\Frontend\Base64(array( "lifetime" => 172800 )); //Create a MongoDB cache $cache = new \Phalcon\Cache\Backend\Mongo($frontCache, array( 'server' => "mongodb://localhost", 'db' => 'caches'

Cache\Frontend\Base64::getLifetime

public getLifetime () Returns the cache lifetime