You are here

interface Redis_Cache_BackendInterface in Redis 7.3

Real cache backend primitives. This functions will be used by the Redis_Cache wrapper class that implements the high-level logic that allows us to be Drupal compatible.

Hierarchy

Expanded class hierarchy of Redis_Cache_BackendInterface

All classes that implement Redis_Cache_BackendInterface

File

lib/Redis/Cache/BackendInterface.php, line 8

View source
interface Redis_Cache_BackendInterface extends Redis_BackendInterface {

  /**
   * Defaut constructor
   *
   * @param string $namespace
   */
  public function __construct($client, $namespace);

  /**
   * Get namespace
   *
   * @return string
   */
  public function getNamespace();

  /**
   * Set last flush time
   *
   * @param int $time
   * @param boolean $volatile
   */
  public function setLastFlushTimeFor($time, $volatile = false);

  /**
   * Get last flush time
   *
   * @return int[]
   *   First value is for non-volatile items, second value is for volatile items.
   */
  public function getLastFlushTime();

  /**
   * Get a single entry
   *
   * @param string $id
   *
   * @return stdClass
   *   Cache entry or false if the entry does not exists.
   */
  public function get($id);

  /**
   * Get multiple entries
   *
   * @param string[] $idList
   *
   * @return stdClass[]
   *   Existing cache entries keyed by id,
   */
  public function getMultiple(array $idList);

  /**
   * Set a single entry
   *
   * @param string $id
   * @param mixed $data
   * @param int $ttl
   * @param boolean $volatile
   */
  public function set($id, $data, $ttl = null, $volatile = false);

  /**
   * Delete a single entry
   *
   * @param string $cid
   */
  public function delete($id);

  /**
   * Delete multiple entries
   *
   * This method should not use a single DEL command but use a pipeline instead
   *
   * @param array $idList
   */
  public function deleteMultiple(array $idList);

  /**
   * Delete entries by prefix
   *
   * @param string $prefix
   */
  public function deleteByPrefix($prefix);

  /**
   * Flush all entries
   */
  public function flush();

  /**
   * Flush all entries marked as temporary
   */
  public function flushVolatile();

}

Members

Namesort descending Modifiers Type Description Overrides
Redis_BackendInterface::getClient public function Get client 1
Redis_BackendInterface::getKey public function Get full key name using the set prefix 1
Redis_BackendInterface::getPrefix public function Get prefix 1
Redis_BackendInterface::setClient public function Set client 1
Redis_BackendInterface::setNamespace public function Set namespace 1
Redis_BackendInterface::setPrefix public function Set prefix 1
Redis_Cache_BackendInterface::delete public function Delete a single entry
Redis_Cache_BackendInterface::deleteByPrefix public function Delete entries by prefix
Redis_Cache_BackendInterface::deleteMultiple public function Delete multiple entries
Redis_Cache_BackendInterface::flush public function Flush all entries
Redis_Cache_BackendInterface::flushVolatile public function Flush all entries marked as temporary
Redis_Cache_BackendInterface::get public function Get a single entry
Redis_Cache_BackendInterface::getLastFlushTime public function Get last flush time
Redis_Cache_BackendInterface::getMultiple public function Get multiple entries
Redis_Cache_BackendInterface::getNamespace public function Get namespace Overrides Redis_BackendInterface::getNamespace
Redis_Cache_BackendInterface::set public function Set a single entry
Redis_Cache_BackendInterface::setLastFlushTimeFor public function Set last flush time
Redis_Cache_BackendInterface::__construct public function Defaut constructor