You are here

public function Redis_Cache_PhpRedis::deleteByPrefix in Redis 7.3

File

lib/Redis/Cache/PhpRedis.php, line 123

Class

Redis_Cache_PhpRedis
Predis cache backend.

Code

public function deleteByPrefix($prefix) {
  $client = $this
    ->getClient();
  $ret = $client
    ->eval(self::EVAL_DELETE_PREFIX, array(
    $this
      ->getKey($prefix . '*'),
  ));
  if (1 != $ret) {
    trigger_error(sprintf("EVAL failed: %s", $client
      ->getLastError()), E_USER_ERROR);
  }
}