Cache\Backend\Memory::serialize

public serialize () Required for interface \Serializable

Cache\Backend\Memory::save

public save ([string $keyName], [string $content], [long $lifetime], [boolean $stopBuffer]) Stores cached content into the backend and stops the frontend

Cache\Backend\Memory::queryKeys

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

Cache\Backend\Memory::increment

public long increment ([string $keyName], [mixed $value]) Increment of given $keyName by $value

Cache\Backend\Memory::get

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

Cache\Backend\Memory::flush

public flush () Immediately invalidates all existing items.

Cache\Backend\Memory::exists

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

Cache\Backend\Memory::delete

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

Cache\Backend\Memory::decrement

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

Cache\Backend\Memory

extends abstract class Phalcon\Cache\Backend implements Phalcon\Cache\BackendInterface, Serializable Source on GitHub Stores content in memory. Data is lost when the request is finished use Phalcon\Cache\Backend\Memory; use Phalcon\Cache\Frontend\Data as FrontData; // Cache data $frontCache = new FrontData(); $cache = new Memory($frontCache); // Cache arbitrary data $cache->save('my-data', [1, 2, 3, 4, 5]); // Get data $data = $cache->get('my-data'); Methods public get (mixed