Search + K

Command Palette

Search for a command to run...

Sign In

Clear the user cache

POST /_security/realm/{realms}/_clear_cache
Copy endpoint

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.

Parameters

path Path Parameters

Name Type
realms required

A comma-separated list of realms. To clear all realms, use an asterisk (*). It does not support other wildcard patterns.

type TypesNames = type TypesName = string | type TypesName = string[]

query Query Parameters

Name Type
usernames

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.

string[]

Responses

200 application/json
{ _nodes: TypesNodeStatistics

Contains statistics about the number of nodes selected by the request.

interface TypesNodeStatistics {
failures?: TypesErrorCause[];
total: number;
successful: number;
failed: number;
}
;cluster_name: TypesName
type TypesName = string
;nodes: { }; }