Remove a settings from database and cache file

@param  string $key

@return void
13067
public function forget($key)
    {
        $keyExp = explode('.', $key);

        // get settings value by first key name
        $query = $this->database
            ->table($this->config['db_table'])
            ->where('setting_key', $keyExp[0]);

        $row = $query->first(['setting_value']);

        if ( ! is_null($row))
        {
            if (count($keyExp) > 1)
            {
                // if found more keys, then forget last key from array
                $setting_value = json_decode($row->setting_value, true);

                unset($keyExp[0]);
                $newKey = implode('.', $keyExp);

                Arr::forget($setting_value, $newKey);


                if (count($setting_value) > 0)
                {
                    // if we still have settings, update settings row
                    $query->update(['setting_value' => json_encode($setting_value)]);
                }
                else
                {
                    // if settings value remain blank, delete settings row
                    $query->delete();
                }
            }
            else
            {
                // if found only one key, delete settings row
                $query->delete();
            }
        }

        $this->cache->forget($key);
    }
842332
public function remove($key)
    {
        $method = 'remove'.$key;

        if (method_exists($this, $method)) {
            $this->$method();
        } else {
            unset($this->metas[$key]);
        }
    }
956751
public function remove($key)
    {
        //~ Check if enabled
        if (!$this->isEnabled()) {
            return false;
        }

        $file = $this->directory . substr(md5($key), 0, 10) . '.dat';
        if (!file_exists($file)) {
            return false;
        }

        unlink($file);
        unset($this->cache[$key]);
        $this->save();

        return true;
    }
1270023
public function unset(string $key)
    {
        if (array_key_exists($key, $this->input)) {
            unset($this->input[$key]);
            unset($this->cache[$key]);
        }

        $item = &$this->input;

        foreach (explode('.', $key) as $segment) {
            if (! isset($item[$segment])) {
                return;
            }
            if (! is_array($item[$segment])) {
                unset($item[$segment]);
                break;
            }
            $item = &$item[$segment];
        }

        unset($this->cache[$key]);
    }
1166543
public function purge($key) {
		
		if ($this->useFallback) {
			if ($this->log) {
				$this->log->trace("Purging key '$key' from file cache.");
			}
			$filename = $this->getFileName($key);
			unlink($filename);
			return;
		}
	
		if ($this->log) {
			$this->log->trace("Purging key '$key' from APC cache.");
		}
	
		apc_delete($key);
	}
1363203
public function delete($key) {
        $filename = $key.'.cache';
        $file = $this->file_path_for_key($key);
        if (@unlink($file)) {
            unset($this->keys[$filename]);
            return true;
        }

        return false;
    }
24818
public function remove(string $key): void
    {
        $key = $this->prepareKey($key);
        $this->properties = Arr::remove($this->properties, $key);
    }
116109
public  function delete($key) : void
    {
        $key = $this->getCompositeKey($key);
        ArrayHelper::delete($this->storage, $key);
        $this->cache->set(self::KEY, $this->storage);
    }
22821
public function remove($key)
    {
        if (array_key_exists($key, $this->settings)) {
            unset($this->settings[$key]);
            return true;
        }
        return false;
    }
802318
public function delete($key)
    {
        $this->initSession();
        $key_name = $this->getSessionKeyName($key);
        unset($_SESSION[$key_name]);
    }
81563
public function clear($key)
    {
        $this->cache->forget($key);

        $this->cache->forget($key .':lockout');
    }
322070
public function delete($key)
    {
        if (isset($this->data[$key])) {
            unset($this->data[$key]);
            $this->root->updated = true;
            $this->root->update();
        }
    }
585798
public function purge($key) {
		if ($this->log) {
			if ($this->log instanceof LoggerInterface) {
				$this->log->info("Purging key '{key}' from file cache.", array('key'=>$key));
			} else {
				$this->log->trace("Purging key '$key' from file cache.");
			}
		}
		$filename = $this->getFileName($key);
		if (file_exists($filename)) {
			unlink($filename);
		}
	}
285697
private function evictFromCacheByKey($key)
    {
        if ( ! $this->cache->contains($key)) {
            return;
        }

        $this->cache->delete($key);
    }
588322
public function forget($key)
        {
            if (File::exists($this->path . $key)) {
                unlink($this->path . $key);
            }
        }
1184724
private function checkForDelayedDelete($key)
    {
        if (array_key_exists($key, $this->deleteQueue) && time() >= $this->deleteQueue[$key]) {
            unset($this->deleteQueue[$key], $this->cache[$key]);
        }
    }
322577
public function delete(string $key): void
    {
        $keyMD5 = md5($key);
        $this->dataRepository->delete($this->keyPrefix . substr($keyMD5, 0, 3) . '/' . substr($keyMD5, 3) . '.2');
    }