Internal mechanics of remove method.

@param mixed $key

@return bool
973851
protected function internalRemove($key): bool
    {
        $this->generatorToArray();

        if (
            $this->pathSeparator
            &&
            \is_string($key)
            &&
            \strpos($key, $this->pathSeparator) !== false
        ) {
            $path = \explode($this->pathSeparator, (string) $key);

            if ($path !== false) {
                // crawl though the keys
                while (\count($path, \COUNT_NORMAL) > 1) {
                    $key = \array_shift($path);

                    if (!$this->has($key)) {
                        return false;
                    }

                    $this->array = &$this->array[$key];
                }

                $key = \array_shift($path);
            }
        }

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

        return true;
    }
503979
public function delete($key) {
        $filename = $this->getFileName($key);
        if (file_exists($filename)) {
            return unlink($filename);
        }else{
            return false;
        }
    }
860114
public function delete(string $key): bool
    {
        $file = $this->cacheFile($key);

        if (is_file($file)) {
            return unlink($file);
        }

        return false;
    }
1060716
public function forget(string $key): bool
    {
        $key = $this->hashKey($key);
        if (\array_key_exists($key, $this->cache)) {
            unset($this->cache[$key]);
            return true;
        }
        return false;
    }
848819
public function remove($key)
    {
        $md5 = md5($key);
        $folderPath = $this->getFolderPathFromMd5($md5);
        $path = $this->path . self::DS . $folderPath . self::DS . $this->prefix . $md5;
        if (!file_exists($path) || !is_readable($path)) {
            return false;
        }

        return unlink($path);
    }
953540
public function delete($key)
    {
        $permission   =   $this->findByKey($key);
        if (! isset($permission)) {
            return true;
        }

        return $permission->delete();
    }
70192
public function delete($key)
    {
        if ($this->has($key)) {
            $values = $this->readFileContents();
            unset($values[$key]);

            return $this->writeFileContents($values);
        }

        return false;
    }
230205
public function forget($key)
    {
        if ($this->files->exists($file = $this->path($key))) {
            return $this->files->delete($file);
        }

        return false;
    }
483034
public function removeItem($key)
    {
        if (!$this->getOptions()->getEnabled()) {
            return false;
        }

        $this->normalizeKey($key);

        $result = false;
        try {
            $result = $this->internalRemoveItem($key);
        } catch (\Exception $e) {
        }

        return $result;
    }
1192321
public function removeByKey(string $key): bool
    {
        if (isset($this->routes[$key])) {
            unset($this->routes[$key]);
            return true;
        }
        return false;
    }
372468
public function forget($key)
    {
        $this->table()->where('key', '=', $this->prefix.$key)->delete();

        return true;
    }
194659
public function delete($key): bool
    {
        if ($this->enabled) {
            $realKey = $this->adjustKey($key);
            return $this->cacheDelete($realKey);
        }
        return false;
    }
985882
public function remove($key)
    {
        if (!$this->hasConnection()) {
            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }

        try {
            return $this->memcache->delete($key);
        // @codeCoverageIgnoreStart
        } catch (\Exception $e) {
        }

        return false;
        // @codeCoverageIgnoreEnd
    }
69886
public function delete($key) {
        if (!is_array($key)) {
            $key = array('key' => $key);
        }
        $key = $key['key'];
        $result = isset($this->store[$key]);
        unset($this->store[$key]);
        if ($this->maxsize !== false) {
            $this->storecount--;
        }
        return $result;
    }
625021
public function purge($key)
    {
        $cacheFile = $this->getCachePath($key);

        clearstatcache(true, $cacheFile);
        if (file_exists($cacheFile)) {
            unset($cacheFile);

            return true;
        }

        return false;
    }
673233
public function delete(string $key): bool
    {
        $this->checkConnection(__METHOD__);
        $delete = $this->engine->delete($key);
        if ($delete && $this->index) {
            $this->index->events()
                ->trigger(Indexing::EVENT_ON_DELETE)
                ->params($key)
                ->fire();
        }

        return $delete;
    }
340158
public function delete($key)
    {
        if (true === array_key_exists($key, $this->cache)) {
            unset($this->cache[$key]);

            return true;
        }

        return false;
    }