extends class Phalcon\Cache\Frontend\Data
implements Phalcon\Cache\FrontendInterface
Discards any kind of frontend data input. This frontend does not have expiration time or any other options
//Create a None Cache $frontCache = new Phalcon\Cache\Frontend\None(); // Create the component that will cache "Data" to a "Memcached" backend // Memcached connection settings $cache = new Phalcon\Cache\Backend\Memcache($frontCache, array( "host" => "localhost", "port" => "11211" )); // This Frontend always return the data as it's returned by the backend $cacheKey = 'robots_order_id.cache'; $robots = $cache->get($cacheKey); if ($robots === null) { // This cache doesn't perform any expiration checking, so the data is always expired // Make the database call and populate the variable $robots = Robots::find(array("order" => "id")); $cache->save($cacheKey, $robots); } // Use $robots :) foreach ($robots as $robot) { echo $robot->name, "\n"; }
Returns cache lifetime, always one second expiring content
Prepare data to be stored
Prepares data to be retrieved to user
Phalcon\Cache\Frontend\Data constructor
Check whether if frontend is buffering output
Starts output frontend. Actually, does nothing
Returns output cached content
Stops output frontend
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Cache_Frontend_None.html