code: protected function setPrivateCache(Response $response, Request $request)
      {
          if (
              !$response->headers->hasCacheControlDirective('public') ||
              $response->headers->hasCacheControlDirective('private')
          ) {
              $response->setPublic();
              foreach ($this->private_headers as $private_header) {
                  if ($request->headers->has($private_header)) {
                      $response->setPrivate();
                      break;
                  }
              }
          }
  
          return $this;
      }
docs: @param Response $response
  @param Request $request
  
  @return ResponseConfigurator