2017-06-28 14:02:40 -04:00
|
|
|
[role="xpack"]
|
2017-04-06 21:04:39 -04:00
|
|
|
[[security-api-clear-cache]]
|
|
|
|
=== Clear Cache API
|
|
|
|
|
|
|
|
The Clear Cache API evicts users from the user cache. You can completely clear
|
|
|
|
the cache or evict specific users.
|
|
|
|
|
|
|
|
For example, to evict all users cached by the `file` realm:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
POST _xpack/security/realm/default_file/_clear_cache
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
|
|
|
|
To evict selected users, specify the `usernames` parameter:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
POST _xpack/security/realm/default_file/_clear_cache?usernames=rdeniro,alpacino
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
|
|
|
|
To clear the caches for multiple realms, specify the realms as a comma-delimited
|
|
|
|
list:
|
|
|
|
|
|
|
|
[source, js]
|
|
|
|
------------------------------------------------------------
|
|
|
|
POST _xpack/security/realm/default_file,ldap1/_clear_cache
|
|
|
|
------------------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
|
2017-06-28 14:02:40 -04:00
|
|
|
For more information, see
|
|
|
|
{xpack-ref}/controlling-user-cache.html[Controlling the User Cache].
|