Clear the privileges cache
Generally available; Added in 7.9.0
Evict privileges from the native application privilege cache. The cache is also automatically cleared for applications that have their privileges updated.
highlight#highlightFromAnchor" href="#topic-required-authorization"> Required authorization
- Cluster privileges:
manage_security
POST
/_security/privilege/{application}/_clear_cache
dropdown#toggle click@window->dropdown#hide touchend@window->dropdown#hide"
data-dropdown-target="button"
data-scrollable="false"
data-headings="false"
aria-expanded="false"
aria-haspopup="true"
role="menu"
tabindex="0">
Console
POST /_security/privilege/myapp/_clear_cache
resp = client.security.clear_cached_privileges(
application="myapp",
)
const response = await client.security.clearCachedPrivileges({
application: "myapp",
});
response = client.security.clear_cached_privileges(
application: "myapp"
)
$resp = $client->security()->clearCachedPrivileges([
"application" => "myapp",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/privilege/myapp/_clear_cache"
client.security().clearCachedPrivileges(c -> c
.application("myapp")
);