at the end, put data in cache
@access public
@param $request
@param $response
@return void
@since 3.0
@package Gcs\Framework\Core\Profiler
766005
public function profiler($request, $response) {
        $this->_stopTime();

        if ($this->_enabled == true) {
            $dataProfiler = [];

            $dataProfiler['time'] = round($this->_time, 2);
            $dataProfiler['timeUser'] = $this->_timeUser;
            $dataProfiler['controller'] = get_included_files();
            $dataProfiler['template'] = $this->_template;
            $dataProfiler['request'] = serialize($request);
            $dataProfiler['response'] = serialize($response);
            $dataProfiler['sql'] = $this->_sql;
            $dataProfiler['get'] = $_GET;
            $dataProfiler['post'] = $_POST;
            $dataProfiler['put'] = Data::instance()->put;
            $dataProfiler['patch'] = Data::instance()->patch;
            $dataProfiler['delete'] = Data::instance()->delete;
            $dataProfiler['session'] = $_SESSION;
            $dataProfiler['cookie'] = $_COOKIE;
            $dataProfiler['files'] = $_FILES;
            $dataProfiler['server'] = $_SERVER;
            $dataProfiler['url'] = $_SERVER['REQUEST_URI'];

            if ($request->controller != 'asset' && $request->controller != 'profiler') {
                $cache = new Cache('core-profiler', 0);
                $cache->setContent($dataProfiler);
                $cache->setCache();
            }

            $cacheId = new Cache('core-profiler-' . $request->src . '.' . $request->controller . '.' . $request->action, 0);
            $cacheId->setContent($dataProfiler);
            $cacheId->setCache();
        }
    }
596227
private function setParams(Response $response)
    {
        $this->protocol = $response->getProtocolVersion();
        $this->statusCode = (int) $response->getStatusCode();
        $this->headers = $response->getHeaders();
        $this->body = json_decode($response->getBody()->getContents());
        $this->extractBodyParts();
    }
1298696
public function shutdown($request, $response)
    {
        $routeMiddlewares = $this->router->getMiddlewares();

        $middlewares = array_merge(array_filter([$routeMiddlewares]), $this->getMiddleware());

        foreach ($middlewares as $middleware) {
            list($name, $parameters) = $this->pipeline->parsePipeString($middleware);

            $instance = $this->container->make($name);

            if (method_exists($instance, 'shutdown')) {
                $instance->shutdown($request, $response);
            }
        }
    }
577301
protected function setHttpCache($response = null)
    {
        $http_cache_config = Lb::app()->getHttpCacheConfig();
        if (isset($http_cache_config['cache_control']) && isset($http_cache_config['offset'])) {
            HttpHelper::setCache($http_cache_config['cache_control'], $http_cache_config['offset'], $response);
        }
    }
1022270
private function storeCachedResponse(Response $response, $method, $url, array $data, array $headers, $minutes)
    {
        if ($this->cache and $minutes > 0)
        {
            $this->cache->storeResponse($response, $method, $url, $data, $headers, $this->basicAuthCredentials, $minutes);
        }
    }
910027
public function handleRequest(Request $request, Response $response) {
		if ($this->static_enable) {
			$request->uri = $request->server['request_uri'];
			$uri = $request->server['request_uri'];
			if (strpos($uri, $this->static_prefix) === 0) {
				$uri = substr($uri, strlen($this->static_prefix));
			}
			$path = realpath($this->static_dir . $uri);
			if ($path !== false && strpos($path, $this->static_dir) === 0) {
				if ($this->executeInterceptor('before', $request, $response) !== null) {
					$request->end();
					$response->end();
					unset($request, $response);
					return;
				}
				$response->mimeType(pathinfo($path, PATHINFO_EXTENSION));
				$response->sendfile($path);
				$this->executeInterceptor('after', $request, $response);
				$request->end();
				$response->end();
				unset($request, $response);
				return;
			}
		}
		$this->router->parse($request);
		if ($this->executeInterceptor('before', $request, $response) !== null) {
			$request->end();
			$response->end();
			unset($request, $response);
			return;
		}
		$this->dispatch($request, $response);
	}
385746
protected function updateCachedRequest($cached, $responseHeaders) {
    if (isset($responseHeaders['connection'])) {
      $hopByHop = array_merge(
        self::$HOP_BY_HOP,
        explode(',', $responseHeaders['connection'])
      );

      $endToEnd = array();
      foreach($hopByHop as $key) {
        if (isset($responseHeaders[$key])) {
          $endToEnd[$key] = $responseHeaders[$key];
        }
      }
      $cached->setResponseHeaders($endToEnd);
    }
  }
86603
private function setTargetGroupCookie(Response $response, Request $request)
    {
        $response->headers->setCookie(
            new Cookie(
                static::TARGET_GROUP_COOKIE,
                $request->headers->get(static::TARGET_GROUP_HEADER),
                static::TARGET_GROUP_COOKIE_LIFETIME
            )
        );

        $response->headers->setCookie(
            new Cookie(
                static::VISITOR_SESSION_COOKIE,
                time()
            )
        );
    }
986859
protected function putInCache(Response $response, $payload) {
    $this->getCache()->put($this->getCacheSection($response), $response->getCacheId(), $payload, $response->getCacheLifetime());
  }
67666
public function parseResponse($response)
    {
        // Parse the response and set the last response and headers.
        $info = curl_getinfo($this->ch);
        $this->__last_response_headers = substr(
            $response,
            0,
            $info['header_size']
        );
        $this->__last_response = substr($response, $info['header_size']);
    }
125836
protected function setResponseStatus(Response $response, $status)
    {
        if (CacheableInterface::CACHE_PUBLIC == $status) {
            $response->setPublic();
        } else {
            $response->setPrivate();
        }
    }
1002061
public function terminate($request, $response)
    {
        $this->terminateMiddleware($request, $response);

        $this->app->terminate();
    }
601852
public static function publicCache(
        ResponseInterface $response,
        /*# int */ $cacheTime = 120
    )/*# : ResponseInterface */ {
        $maxAge = $cacheTime * 60;
        return $response
            ->withAddedHeader('Expires', self::timeStamp($maxAge))
            ->withAddedHeader('Cache-Control', "public, max-age={$maxAge}")
            ->withAddedHeader('Last-Modified', self::timeStamp());
    }
1316579
private function cacheVary(
        RequestInterface $request,
        ResponseInterface $response
    ) {
        $key = $this->getVaryKey($request);
        $this->cache->save($key, $this->normalizeVary($response), $this->getTtl($response));
    }
20236
public function setResponseCacheParameters(Response $response, $maxAge, $status = CacheableInterface::CACHE_PRIVATE, $hasEsi = false)
    {
        $this->setResponseStatus($response, $status);
        $this->setResponseMaxAge($response, $status, $maxAge, $hasEsi);

        return $response;
    }
742809
public function SetStrategy(Response &$response)
    {
        if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
            return true;
        }
        $this->AuthClass = $this->provider::Get($this->classes::Instance())->GetLoginData();
        foreach ($this->permission as $val) {
            if (!in_array($val, $this->AuthClass[$this->dataKey])) {
                $this->PermissionDenied($response, $val);
            }
        }

        header('Cache-Control: must-revalidate');
        header('Cache-Control: no-cache');
        return true;
    }
572692
protected function writeQueuedCookies(Response $response)
    {
        foreach ($this->queue->getQueuedCookies() as $cookie) {
            $response->headers->setCookie($cookie);
        }
    }