Deletes several keys from the cache in a single action.

@param array $keys The keys to delete
@return int The number of items successfully deleted.
493798
public function delete_many(array $keys) {
        $count = 0;
        foreach ($keys as $key) {
            if (!is_array($key)) {
                $key = array('key' => $key);
            }
            $key = $key['key'];
            if (isset($this->store[$key])) {
                $count++;
            }
            unset($this->store[$key]);
        }
        if ($this->maxsize !== false) {
            $this->storecount -= $count;
        }
        return $count;
    }
751307
public function removeActionMessages(...$keys) {
        $messages = $this->getAttribute(ACTION_MESSAGES_KEY);
        $dropped = [];

        foreach ($keys as $key) {
            if (isset($messages[$key]))
                $dropped[$key] = $messages[$key];
            unset($this->attributes[ACTION_MESSAGES_KEY][$key]);
        }
        if ($keys)
            return $dropped;

        unset($this->attributes[ACTION_MESSAGES_KEY]);
        return $messages;
    }
624039
public function forgetMany(array $keys)
    {
        if (! method_exists($this->store, 'forgetMany')) {
            return array_combine($keys, array_map([$this, 'forget'], $keys));
        }

        $success = $this->store->forgetMany($keys);

        foreach ($success as $key => $value) {
            $this->fireCacheEvent('delete', [$key]);
        }

        return $success;
    }
284264
public static function delete(array &$array, string ...$keys)
    {
        if ($keys === []) {
            return;
        }

        $original = &$array;
        foreach ($keys as $key) {
            // if the exact key exists in the top-level, remove it
            if (isset($array[$key])) {
                unset($array[$key]);
                continue;
            }

            // clean up before each pass
            $array = &$original;

            $parts = \explode('.', $key);
            $delKey = \array_pop($parts);
            foreach ($parts as $part) {
                if (isset($array[$part]) && \is_array($array[$part])) {
                    $array = &$array[$part];
                } else {
                    continue 2;
                }
            }

            unset($array[$delKey]);
        }
    }
55708
public function del(...$keys)
    {
        $this->prepareArguments('del', ...$keys);
        $this->init();
        return $this->driver->del(...$keys);
    }
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;
	}
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;
    }
62523
protected static function deleteMultiple(array &$arr, array $keys)
    {
        $return = [];
        foreach ($keys as $key) {
            $return[$key] = static::delete($arr, $key);
        }

        return $return;
    }
900802
private function isKeyRange($key, Array $keys)
    {
        if (empty($keys)) {
            return false;
            
        }
        return \reset($keys)->getKey() <= $key
            && \end($keys)->getKey() >= $key;
    }
671645
public function clearMany($keys)
    {
        if (!is_array($keys))
            $keys = func_get_args();

        foreach($keys as $key) {
            unset($this->_data[$key]);
        }

        return $this;

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

        return array_fill_keys($keys, true);
    }
28539
public function purge(array $keys=null)
    {
        if ($keys === null) {
            $this->_attributes = [];
            return $this->filesystem->delete($this->url);
        }

        if (!$keys) {
            return false;
        }

        $this->bootOnce();

        foreach ($keys as $key) {
            $this->offsetUnset($key);
        }

        return $this->persist();
    }
622689
public static function deleteBatch(...$keys)
    {
        $memoryTableAnnotation = ModelManager::getAnnotation(static::class, MemoryTable::class);
        if(null === $memoryTableAnnotation)
        {
            return null;
        }
        if(isset($keys[0]) && is_array($keys[0]))
        {
            $keys = $keys[0];
        }
        foreach($keys as $key)
        {
            MemoryTableManager::del($memoryTableAnnotation->name, $key);
        }
    }
241170
private function filterByKeys(array $keys)
    {
        $results = [];

        foreach ($this->items as $key => $value) {
            if (!in_array($key, $keys)) {
                continue;
            }

            $results[$key] = $value;
        }

        return $results;
    }
187116
public function deleteItems(array $keys)
    {
        foreach ($keys as $key) {
            $this->_cacheEngine->delete($key);
            $this->removeElementFromBuffer($key);
        }
        
        return true;
    }
1187477
public function delete_many(array $keys) {
        // The number of items that have actually being removed.
        $reduction = 0;
        foreach ($keys as $key) {
            if (isset($this->store[$key])) {
                $reduction++;
            }
            unset($this->store[$key]);
        }
        if ($this->maxsize !== false) {
            $this->storecount -= $reduction;
        }
        return $reduction;
    }
571823
public function deleteMultiple($keys): bool
    {
        $this->checkIterable($keys);
        $return = true;
        foreach ($keys as $key) {
            $return = $return && $this->delete($key);
        }
        return $return;
    }