async def clear_trained_model_deployment_cache(
        self,
        *,
        model_id: str,
        error_trace: t.Optional[bool] = None,
        filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        human: t.Optional[bool] = None,
        pretty: t.Optional[bool] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Clear trained model deployment cache.</p>
          <p>Cache will be cleared on all nodes where the trained model is assigned.
          A trained model deployment may have an inference cache enabled.
          As requests are handled by each allocated node, their responses may be cached on that individual node.
          Calling this API clears the caches without restarting the deployment.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache>`_

        :param model_id: The unique identifier of the trained model.
        """
        if model_id in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'model_id'")
        __path_parts: t.Dict[str, str] = {"model_id": _quote(model_id)}
        __path = (
            f'/_ml/trained_models/{__path_parts["model_id"]}/deployment/cache/_clear'
        )
        __query: t.Dict[str, t.Any] = {}
        if error_trace is not None:
            __query["error_trace"] = error_trace
        if filter_path is not None:
            __query["filter_path"] = filter_path
        if human is not None:
            __query["human"] = human
        if pretty is not None:
            __query["pretty"] = pretty
        __headers = {"accept": "application/json"}
        return await self.perform_request(  # type: ignore[return-value]
            "POST",
            __path,
            params=__query,
            headers=__headers,
            endpoint_id="ml.clear_trained_model_deployment_cache",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Clear trained model deployment cache.</p>
          <p>Cache will be cleared on all nodes where the trained model is assigned.
          A trained model deployment may have an inference cache enabled.
          As requests are handled by each allocated node, their responses may be cached on that individual node.
          Calling this API clears the caches without restarting the deployment.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache>`_

        :param model_id: The unique identifier of the trained model.
        
elasticsearch/_async/client/ml.py