[[reference-ml-clear_trained_model_deployment_cache]]

////////
===========================================================================================================================
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
||        ██████╗ ███████╗ █████╗ ██████╗ ███╗   ███╗███████╗                                                            ||
||        ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝                                                            ||
||        ██████╔╝█████╗  ███████║██║  ██║██╔████╔██║█████╗                                                              ||
||        ██╔══██╗██╔══╝  ██╔══██║██║  ██║██║╚██╔╝██║██╔══╝                                                              ||
||        ██║  ██║███████╗██║  ██║██████╔╝██║ ╚═╝ ██║███████╗                                                            ||
||        ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝╚═════╝ ╚═╝     ╚═╝╚══════╝                                                            ||
||                                                                                                                       ||
||                                                                                                                       ||
||    This file is autogenerated, DO NOT send pull requests that changes this file directly.                             ||
||    You should update the script that does the generation, which can be found in:                                      ||
||    https://github.com/elastic/elastic-client-generator-js                                                             ||
||                                                                                                                       ||
||    You can run the script with the following command:                                                                 ||
||       npm run elasticsearch -- --version <version>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////

[discrete]
=== client.ml.clearTrainedModelDeploymentCache

Clear trained model deployment cache. 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.

{ref}/clear-trained-model-deployment-cache.html[{es} documentation]

[discrete]
==== Function signature

[source,ts]
----
(MlClearTrainedModelDeploymentCacheRequest, options?): Promise<MlClearTrainedModelDeploymentCacheResponse>
----

[discrete]
===== `MlClearTrainedModelDeploymentCacheRequest`

[source,ts]
----
interface MlClearTrainedModelDeploymentCacheRequest extends <<shared-type-request-base, RequestBase>> {
  model_id: <<shared-type-id, Id>>
}
----

[discrete]
===== `MlClearTrainedModelDeploymentCacheResponse`

[source,ts]
----
interface MlClearTrainedModelDeploymentCacheResponse {
  cleared: boolean
}
----

