Removes multiple items from the pool.

@param array $keys An array of keys that should be removed from the pool.

@author Benjamin Carl <opensource@clickalicious.de>

@return $this The invoked object.
320600
public function deleteItems(array $keys)
    {
        foreach ($keys as $key) {
            try {
                $this->delete($key);

            } catch (Exception $e) {}
        }

        return $this;
    }
620831
public function exclude(...$keys): self {
        if ($keys) {
            foreach ($keys as $key) {
                $this->_excludeKeys[$key] = 1;
            }
        } else {
            $this->_excludeKeys = [];
        }
        return $this;
    }
452012
public function delete(...$keys)
    {
        $pool = $this->cachePool();

        $results = true;
        foreach ($keys as $key) {
            $results = $pool->deleteItem($key) && $results;
        }

        return $results;
    }
796946
public function forget($keys)
	{
		if( ! is_array($keys) )
		{
			if( func_num_args() == 1 )
			{
				$this->offsetUnset($keys);
				return $this;
			}
			else
			{
				$keys = func_get_args();
			}
		}

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

		return $this;
	}
423753
public function purge(array $keys=null)
    {

        if ($keys === null) {

            $someonePurged = false;

            $storages = $this->preloadAllStorages();

            foreach ($storages as $url=>$storage) {

                if ($result = $storage->purge()) {
                    $someonePurged = true;
                }

                $this->removeStorageIfLoaded($url);

            }

            return $someonePurged;
        }

        if (!$keys) {
            return false;
        }

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

        return $this->persist();

    }
824148
public function replaceAllKeys(array $keys): self
    {
        return static::create(
            \array_combine($keys, $this->getArray()),
            $this->iteratorClass,
            false
        );
    }
729280
public function delete($keys): int
    {
        if (!is_array($keys)) {
            $keys = [$keys];
        }
        return $this->handle->zRem($this->name, ...$keys);
    }
827966
public function deleteMultiple($keys)
    {
        array_walk($keys, function (&$v) {
            $v = $this->buildCacheKey($v);
        });

        return $this->cache->deleteMultiple($keys);
    }
1262787
public function unsetItems($keys = null)
    {
        if (is_null($keys)) {
            $this->_items = [];
        } elseif (is_scalar($keys)) {
            unset($this->_items[$keys]);
        } else {
            foreach ($keys as $k) {
                unset($this->_items[$k]);
            }
        }
    }
187116
public function deleteItems(array $keys)
    {
        foreach ($keys as $key) {
            $this->_cacheEngine->delete($key);
            $this->removeElementFromBuffer($key);
        }
        
        return true;
    }
861406
public function only($keys)
    {
        if ($keys === null) {
            return new static($this->objects);
        }

        $keys = is_array($keys) ? $keys : func_get_args();

        return new static(array_intersect_key($this->objects, array_flip($keys)));
    }
439254
public function remove( ...$items )
	{

		foreach ( $items as $item )
		if ( ( $index = $this->indexOf( $item ) ) !== null )
			unset( $this->items[ $index ] );

		return $this;
	}
661599
public function clear(array $keys=null)
    {
        if ($keys === null) {
            foreach ($this->storages as $storage) {
                $storage->clear();
            }
            return $this;
        }

        if (!$keys) {
            return $this;
        }

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

        return $this;
    }
465774
public function deleteMulti(array $keys): void
    {
        if ($this->enabled === false) {
            return;
        }

        foreach ($keys as $index) {
            if ($key = $this->cacheIndex[$index] ?? null) {
                unset($this->cacheIndex[$index]);
            } else {
                $key = $index;
            }

            unset($this->cache[$key], $this->cacheExpiryTime[$key], $this->cacheAccessCount[$key]);
        }
    }
1175752
public function only($keys)
    {
        if (is_null($keys)) {
            return new static($this->items);
        }

        return new static(array_intersect_key($this->items, array_flip((array)$keys)));
    }
904483
public function remove($key)
    {
        if ($this->isAcceptable($key)) {
            $key = $this->modelKey($key);
        }

        unset($this->objects[$key]);

        return $this;
    }
374110
public function detach($keys): bool
    {
        if ($keys instanceof Arrayable) {
            $keys = $keys->toArray();
        }

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

        return true;
    }