protected function updateResponse(Request $request, Response $response)
    {
        $this->stopProfiling(ProfilingCollection::REQUEST_TIMER);

        if ($this->needToUpdateResponse($response)) {
            $data = $this->getResponseData($response);

            if ($data === false) {
                return;
            }

            $data[$this->responseKey] = $this->storage->getData();

            $this->setResponseData($response, $data);
        }
    }