Clear the user cache
Generally available
Evict users from the user cache. You can completely clear the cache or evict specific users.
User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request. There are realm settings that you can use to configure the user cache. For more information, refer to the documentation about controlling the user cache.
Path parameters
-
A comma-separated list of realms. To clear all realms, use an asterisk (
*
). It does not support other wildcard patterns.
POST
/_security/realm/{realms}/_clear_cache
Console
POST /_security/realm/default_file/_clear_cache
resp = client.security.clear_cached_realms(
realms="default_file",
)
const response = await client.security.clearCachedRealms({
realms: "default_file",
});
response = client.security.clear_cached_realms(
realms: "default_file"
)
$resp = $client->security()->clearCachedRealms([
"realms" => "default_file",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_security/realm/default_file/_clear_cache"