Set cache key field name

@param string $key

@return boolean Returns `TRUE` on success, `FALSE` on failure
182343
public function setKeyName($key)
    {
        if ($this->sql) {
            if ($this->validateToken($key)) {
                $this->key = $key;
                return true;
            } else {
                throw new SimpleCache_Exception("`$key` is not a valid field name");
            }
        }
        return false;
    }
1068573
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $has_key = file_exists($this->file($key));

//        $this->Logger->debug("Cache contains {$key}? " . ($has_key) ? 'TRUE' : 'FALSE');

        return $has_key;
    }
287784
public function setKey($key = null)
    {
        if (empty($key)) {

            $key = $this->get('private_key');

            if (empty($key)) {
                $key = gplcart_string_random();
                $this->set('private_key', $key);
            }

        } else {
            $this->set('private_key', $key);
        }

        return $this->key = $key;
    }
194659
public function delete($key): bool
    {
        if ($this->enabled) {
            $realKey = $this->adjustKey($key);
            return $this->cacheDelete($realKey);
        }
        return false;
    }
203920
public function hasKey(string $key): bool
    {
        if (null === $this->data) {
            $this->buildIndex();
        }

        return $key && strpos($key, '@@') === false && isset($this->data[$key]);
    }
123835
public function addKey( $key )
	{
		if( is_array( $key ) )
			return $this->addKeys( $key );
		if( in_array( $key, $this->keys ) )
			return FALSE;
		$this->keys[] = $key;
		return TRUE;
	}
1229373
private function keyToName($key)
    {
        $parts = explode('_', $key);
        $name = '';

        foreach ($parts as $part) {
            $name .= ucfirst($part);
        }

        return $name;
    }
1076281
public function delete($key)
    {
        if (!$this->enabled)
            return true;

        $this->Logger->debug("Delete key: {$key}");
        return $this->db->queryExec("DELETE FROM cache WHERE key='" . $this->key($key). "'");
    }
566246
protected function checkKey($key):string{

		if(!is_string($key) || empty($key)){
			$msg = 'invalid cache key: "'.$key.'"';
			$this->logger->error($msg);

			throw new InvalidArgumentException($msg);
		}

		return $key;
	}
138274
protected function driverKey($key) {
        if (is_object($key)) {
            $key = get_class($key);
        }
        $key = strtolower(basename($key));

        if (preg_match('`([az]+)(Db)?$`', $key, $m)) {
            $key = $m;
        }
        return $key;
    }
160727
public function forget($key)
	{
		@list($group, $name) = $this->id($key);

		$this->engine->setOption('cacheDir', $this->directory . DS . $group . DS);

		$success = $this->engine->remove($name, $group);

		if ($success == true)
		{
			return $success;
		}

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

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

        return false;
    }
397443
public function hasConfigurationKey($key)
    {
        $result = true;
        $configuration = $this->getConfiguration();

        $pathParts = explode(self::DELIMITER, $key);
        foreach ($pathParts as $pathPart) {
            if (array_key_exists(ucfirst($pathPart), $configuration) === false) {
                $result = false;
                break;
            } else {
                $configuration = $configuration[ucfirst($pathPart)];
            }
        }

        return $result;
    }
204401
protected function isAllowedKey($key): bool
    {
        return empty($this->allowedKeys) || \in_array($key, $this->allowedKeys, true);
    }
575887
public function delete($key)
    {
        $cache_file = $this->path($key);
        if (file_exists($cache_file)) {
            $unlink_result = unlink($cache_file);
            if ($unlink_result === false) return false;
        }

        return true;
    }
869400
public function remove($key){
        return ($this->memcache) ? $this->memcache->remove($this->prefix . '_' . $key) : false;
    }
970235
public function __isset($key)
    {
        $k = strtolower($key);
        //check for specialised discovery method
        $methodName = 'has' . ucfirst($k);
        if (method_exists($this, $methodName)) {
            return $this->$methodName();
        } elseif (array_key_exists($k, $this->buildItems) && !is_null($this->buildItems[$k])) {
            return true;
        }
        
        return false;
    }