Removes a stored variable from the cache.

@param string $key The variable name

@return null|bool Returns null if adapter is disabled, true on success,
false otherwise
333609
public function remove($key)
    {
        if (! $this->enabled) {
            return;
        }
        $file = $this->getPath($key);
        if (! file_exists($file)) {
            return true;
        }

        set_error_handler(function () {
            throw new Exception('An error occurred.');
        }, E_WARNING);

        try {
            unlink($file);
        } catch (Exception $ex) {
            restore_error_handler();

            return false;
        }
        restore_error_handler();

        return true;
    }
1103233
public static function forget($key)
    {
        $path = Cache::path($key);

        if (file_exists($path)) {
            return unlink($path);
        }

        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;
    }
663871
public function removeKey($key)
    {
        if ($this->hasKey($key)) {
            unset($this->container[$key]);
            return true;
        } else {
            return false;
        }
    }
295773
private function deleteStore($key)
    {
        if (isset($this->storage[$key])) {
            unset($this->storage[$key]);
            return $this->save();
        }

        return true;
    }
1260889
public function forget($key)
    {
        $isDeleted = SettingModel::where('key', $key)
            ->delete();

        // if delete record then delete cache
        if ($isDeleted) {
            Cache::forget('Klaravel\Settings\Setting');
        }

        return $isDeleted;
    }
29434
public function remove($key)
    {
        $file = $this->getFileName($key);

        if ( !file_exists($file) )
        {
            return false;
        }

        unset(static::$keys[$key]);

        return (unlink($file))? true : false;
    }
668313
public function delete($key) {
    // Sending of a key of 'null' or an unset value is a failure.
    if (is_null($key)) {
      return false;
    }

    $request = new MemcacheDeleteRequest();
    $response = new MemcacheDeleteResponse();

    $request->addItem()->setKey($key);

    try {
      ApiProxy::makeSyncCall('memcache', 'Delete', $request, $response);
    } catch (Error $e) {
      return false;
    }
    $status_list = $response->getDeleteStatusList();
    return $status_list[0] == DeleteStatusCode::DELETED;
  }
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;
    }
741873
public function remove($key)
    {
        if (!$this->isEnabled() || !$this->has($key)) {
            return false;
        }

        eaccelerator_rm($this->prefix() . $key);

        return true;
    }
1092040
public function remove($key): bool
    {
        $removed = false;
        $bucket = $this->locate($key);

        if ($bucket !== null) {
            $this->removeBucket($bucket);
            $this->rewind();
            $removed = true;
        }

        return $removed;
    }
747575
public function remove ($key) {
        if (!$this->getConnection ()->getClient ()->zrem ($this->name , $key)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        return true;
    }
656493
public function forget($key = null)
    {
        $key = $key ?: $this->getCacheKey();

        $cache = $this->getCache();

        return $cache->forget($key);
    }
1279213
public function delete(string $key) : bool
    {
        if (!$this->cacheStore->delete($key)) {
            // Unlikely, but safer.
            throw new RuntimeException(
                'Underlying cache store type[' . get_class($this->cacheStore)
                . '] failed to delete cache item, key[' . $key . '].'
            );
        }
        return true;
    }
1281163
public function removeData(string $key = null): bool
    {
        if ($key === null) {
            $this->data = [];
            return true;
        }
        if (array_key_exists($key, $this->data)) {
            unset($this->data[$key]);
            return true;
        }
        return false;
    }
1252045
public function remove($key)
	{
		$this->connect();

		$result = (bool) $this->driver->del($key);

		return $result;
	}
1011376
public static function remove($key) {

		if(false === is_string($key)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
		}

		if($key && isset(static :: $data[$key])) {
			unset(static :: $data[$key]);
		}
	}