protected function getCacheFilename(Core $core)
    {
        // no cache id provided, use request_uri as default
        if ($this->cacheId === null) {
            if (isset($_SERVER['REQUEST_URI']) === true) {
                $cacheId = $_SERVER['REQUEST_URI'];
            } elseif (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['argv'])) {
                $cacheId = $_SERVER['SCRIPT_FILENAME'] . '-' . implode('-', $_SERVER['argv']);
            } else {
                $cacheId = '';
            }
            // force compiled id generation
            $this->getCompiledFilename($core);

            $this->cacheId = str_replace('../', '__',
                $this->compileId . strtr($cacheId, '\\%?=!:;' . PATH_SEPARATOR, '/-------'));
        }

        return $core->getCacheDir() . $this->cacheId . '.html';
    }