Clear the user cache
- POST /_security/realm/{realms}/_clear_cache
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.
Read the reference documentationPath Parameters
-
realmsName | Namerequired -
A comma-separated list of realms. To clear all realms, use an asterisk (
*). It does not support other wildcard patterns.
Query Parameters
-
usernamesstring A comma-separated list of the users to clear from the cache. If you do not specify this parameter, the API evicts all users from the user cache.
Response
-
_nodesNodeStatisticsrequired -
failuresErrorCause -
typestringrequired -
The type of error
-
reasonstringnullable -
A human-readable explanation of the error, in English.
-
stack_tracestring -
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
caused_byErrorCause -
root_causeErrorCause -
suppressedErrorCause -
totalnumberrequired -
Total number of nodes selected by the request.
-
successfulnumberrequired -
Number of nodes that responded successfully to the request.
-
failednumberrequired -
Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.
-
cluster_namestring Namerequired