del

Remove specified keys.

@param array $keys An array of keys, or variadic parameters,
each corresponding to a Redis key.
@return long Number of keys deleted.
357192
final public function del($keys) {
		$res = $this->connection->del($keys);
		$res_log = $res ? 'ok' : 'fail';
		$res_keys = $keys;
		if (!is_array($keys))
			$keys = func_get_args();
		$res_keys = json_encode($keys);
		self::$logger->info(sprintf(
			"Redis: delete %s: '%s'.",
			$res_log, $res_keys));
		return $res;
	}
441888
public function forget($keys)
    {
        $items = $this->get();
        foreach ($keys as $key) {

        }
        $items->forget($keys);
    }
1098839
public function delFieldsArray(array $fields)
	{
	        foreach ($fields as $field) {
                        $this->_redis->hdel($this->_key, $field);
                }
	}
1192131
public function forget($keys)
    {
        $keys = (! is_array($keys)) ?: [$keys];

        foreach ($keys as $key) {
            $this->remove($key);
        }
    }
837070
public function forgetMany(array $keys)
    {
        $this->connection()->del($this->prefixKeys($keys));

        return array_fill_keys($keys, true);
    }
927407
public function mdelete($keys){
		//$this->queries_mset_count++;
		$result=true;
		foreach($keys as $key){
			$r=$this->delete($key);
			$result=$result & $r;
			}
		return $result;
		}
320600
public function deleteItems(array $keys)
    {
        foreach ($keys as $key) {
            try {
                $this->delete($key);

            } catch (Exception $e) {}
        }

        return $this;
    }
1007715
public static function removeKeys($array, $keys)
    {
        // Loop over the array
        foreach ($array as $key => $value) {
            // Check if we want to remove it...
            if (!is_numeric($key) and in_array($key, $keys)) {
                unset($array[$key]);
                continue;
            }

            // Filter the value if it's an array also
            $array[$key] = is_array($value) ? static::removeKeys($value, $keys) : $value;
        }

        return $array;
    }
450260
public function removeLocalConfigurationKeysByPath(array $keys)
    {
        $result = false;
        $localConfiguration = $this->getLocalConfiguration();
        foreach ($keys as $path) {
            // Remove key if path is within LocalConfiguration
            if (ArrayUtility::isValidPath($localConfiguration, $path)) {
                $result = true;
                $localConfiguration = ArrayUtility::removeByPath($localConfiguration, $path);
            }
        }
        if ($result) {
            $this->writeLocalConfiguration($localConfiguration);
        }

        return $result;
    }
877697
protected function removeFromOldFlashData(array $keys)
        {
            $old_data = $this->session->getValue($this->key_name.'.old');

            if (! is_array($old_data)) {
                $old_data = array();
            }
            $this->session->setValue($this->key_name.'.old', array_diff($old_data, $keys));
        }
489515
public function deleteMultiple($keys)
    {
        if (!is_array($keys)) {
            throw new InvalidArgumentException(sprintf('Cache keys must be array, "%s" given', is_object($keys) ? get_class($keys) : gettype($keys)));
        }

        return $this->mem->deleteMulti($keys);
    }
1365194
public Long del(Object... keys) {
		Jedis jedis = getJedis();
		try {
			return jedis.del(keysToBytesArray(keys));
		}
		finally {close(jedis);}
	}
471491
public function deleteItems(array $keys)
    {
        if (!$keys) {
            return true;
        }

        $ids = [];
        $tagData = [];

        foreach ($keys as $key) {
            $ids[$key] = $this->getId($key);
            unset($this->deferred[$key]);
        }

        foreach ($this->doFetch($ids) as $id => $value) {
            foreach ($value['tags'] ?? [] as $tag) {
                $tagData[$this->getId(self::TAGS_PREFIX.$tag)][] = $id;
            }
        }

        try {
            if ($this->doDelete(\array_values($ids), $tagData)) {
                return true;
            }
        } catch (\Exception $e) {
        }

        $ok = true;

        // When bulk-delete failed, retry each item individually
        foreach ($ids as $key => $id) {
            try {
                $e = null;
                if ($this->doDelete([$id])) {
                    continue;
                }
            } catch (\Exception $e) {
            }
            CacheItem::log($this->logger, 'Failed to delete key "{key}"', ['key' => $key, 'exception' => $e]);
            $ok = false;
        }

        return $ok;
    }
791234
public function reset(array $keys)
    {
        foreach ($keys as $key) {
            $this->getSettingOrFail($key);
        }

        $this->backend->removeSettings($keys);
    }
1048223
static private function filterKeys( array &$keys )
    {
        if ( isset( $GLOBALS['eZRequestError'] ) && $GLOBALS['eZRequestError'] === true )
        {
            $requestUri = eZSys::requestURI();
            foreach ( $keys as $i => &$key )
            {
                if ( is_array( $key ) )
                {
                    self::filterKeys( $key );
                }
                else if ( $key === $requestUri )
                {
                    unset( $keys[$i] );
                }
            }
        }
    }
1049708
public function deleteItems(array $keys): bool
    {
        foreach ($keys as $key) {
            $this->delete($key);
        }

        return true;
    }
525803
public function deleteByArray(array $ids, string $key = null): int
    {
        return $this->deleteByKey($ids, $key);
    }