replace changed data by original data
set data changed to false only if restore whole data

@param string|null $key
@return $this
437293
public function restore($key = null)
    {
        if (is_null($key)) {
            $mergedData         = array_merge($this->_DATA, $this->_originalDATA);
            $this->_DATA        = $this->_removeNewKeys($mergedData);
            $this->_dataChanged = false;
            $this->_newKeys     = [];
        } else {
            if (array_key_exists($key, $this->_originalDATA)) {
                $this->_DATA[$key] = $this->_originalDATA[$key];
            }
        }

        return $this;
    }
1124353
public function delete($key)
    {
        $redis = is_object($this->_redis) ? $this->_redis : $this->_getRedis();
        $redis->delete($this->_prefix . $key);

        return $this;
    }
75183
public function newFromKey($key)
    {
        $scope = $this->get($key);
        if ($this->checkRefs && is_array($scope)) {
            $this->replaceRefs($key, $scope);
        }
        $result = new static($scope);

        return $result;
    }
1011351
public function offsetExists($key)
    {
        if(isset($this->data[$key])){
            return new self($this->data[$key]);
        }

        return false;
    }
79763
public function alias($key) {
        if (count($this->from) == 1) {
            $this->from = array($key => current($this->from));
        }
        return $this;
    }
767854
public function update(string $key, $data)
	{
		if (is_string($data)) {
			$data = $this->normalizeToCollection($data);
		}

		if ($this->allowed->has($key)) {
			$this->updatePreferencesForKey(
				$key, $this->normalizedTags($data)
			);

			$this->updateCategories(
				$data->pluck('category_id')->unique()
			);
		}

		return $this;
	}
1300767
public function remove($key)
    {
        $key = $this->resolveAlias($key);

        if (isset($this->dataStore[$key])) {
            unset($this->dataStore[$key]);
        }

        return $this;
    }
14706
public function remove($key) {

		if(!array_key_exists($key, $this->data)) {
			return NULL;
		}

		$oldValue = $this->data[$key];
		unset($this->data[$key]);

		return $oldValue;

	}
298589
public function delete($key = null)
    {
        if ($key === null) {
            $this->reset();

            return $this;
        }

        $arr = &$this->getStackByReference($key);

        if (is_array($arr) && array_key_exists($key, $arr)) {
            unset($arr[$key]);
        }

        return $this;
    }
392517
public function delete($key)
    {
        key_exists_or_fail($key, $this->data);
        unset($this->data[$key]);
        $this->data = array_values($this->data);

        return $this;
    }
1321710
public function setKey($key)
    {
        $this->key = $key;

        // Initialize if we're the first instance.
        if (! session()->has('bzarzuela.filters')) {
            session(['bzarzuela.filters' => [$key => []]]);
        }

        return $this;
    }
656493
public function forget($key = null)
    {
        $key = $key ?: $this->getCacheKey();

        $cache = $this->getCache();

        return $cache->forget($key);
    }
1282666
public function without($key): self
    {
        if (!$this->has($key)) {
            return $this;
        }

        $clone = clone $this;
        unset($clone->keys[$key]);

        return $clone;
    }
1039207
public function replaceKey($data, $replace_key, $key = "--key--")
    {
        foreach ($data as $elem_key => $elem) {
            if (is_array($elem)) {
                $data[$elem_key] = $this->replaceKey($elem, $replace_key);
            } else {
                if ($data[$elem_key] == $key) {
                    $data[$elem_key] = $replace_key;
                }
            }
        }
        return $data;
    }
1210131
public function delete($key)
    {
        $key = (string)$key;

        if (\array_key_exists($key, self::$registry)) {
            unset(self::$registry[$key]);
        }
        return $this;
    }
998546
public function keyDataChanged($key)
    {
        $data           = $this->toArray($key);
        $originalData   = $this->returnOriginalData($key);

        return $data !== $originalData;
    }
1043177
public function remove($key)
    {
        $key = strtr(strtolower($key), '_', '-');
        unset($this->_data[$key]);
        return $this;
    }