/** * @param $query * * @return bool */ protected function _destroyCache($query) { $this->_cacheSetConnection(); if (isset($this->cache_con) && !empty($this->cache_con)) { return $this->cache_con->delete($query); } return false; }
public static function zsetAddAndReturn(Predis\Client $client, $keyName, array $values, $wipeOut = 0) { // $values: array(SCORE => VALUE, ...); if ($wipeOut == true) { $client->delete($keyName); } foreach ($values as $value => $score) { $client->zsetAdd($keyName, $score, $value); } return $values; }