Cache\Backend\Xcache

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 XCache backend use Phalcon\Cache\Backend\Xcache; use Phalcon\Cache\Frontend\Data as FrontData; // Cache data for 2 days $frontCache = new FrontData([ 'lifetime' => 172800 ]); $cache = new Xcache($frontCache, [ 'prefix' => 'app-data' ]); // Cache arbitrary data $cache->save('my-data', [1, 2, 3, 4, 5]

Cache\Backend\Redis::_connect

public _connect () Create internal connection to redis

Cache\Backend\Redis::queryKeys

public queryKeys ([string $prefix]) Query the existing cached keys

Cache\Backend\Redis::decrement

public decrement ([string $keyName], [long $value]) Decrement of $keyName by given $value

Cache\Backend\Redis

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 redis backend This adapter uses the special redis key “_PHCR” to store all the keys internally used by the adapter use Phalcon\Cache\Backend\Redis; use Phalcon\Cache\Frontend\Data as FrontData; // Cache data for 2 days $frontCache = new FrontData([ 'lifetime' => 172800 ]); // Create the Cache setting redis connection o

Cache\Backend\Redis::flush

public flush () Immediately invalidates all existing items.

Cache\Backend\Redis::delete

public delete (int | string $keyName) Deletes a value from the cache by its key

Cache\Backend\Redis::get

public get (mixed $keyName, [mixed $lifetime]) Returns a cached content

Cache\Backend\Redis::exists

public boolean exists ([string $keyName], [long $lifetime]) Checks if cache exists and it isn’t expired

Cache\Backend\Mongo::queryKeys

public array queryKeys ([string $prefix]) Query the existing cached keys