protected function needToUpdateResponse(Response $response)
    {
        $isJsonResponse = $response instanceof JsonResponse || $response->headers->contains('content-type',
                'application/json');

        return $isJsonResponse && !$this->storage->isEmpty();
    }