OpenSearch/docs/java-rest/high-level/security/clear-privileges-cache.asciidoc
Yang Wang a5a8b4ae1d
Add cache for application privileges (#55836) (#58798)
Add caching support for application privileges to reduce number of round-trips to security index when building application privilege descriptors.

Privilege retrieving in NativePrivilegeStore is changed to always fetching all privilege documents for a given application. The caching is applied to all places including "get privilege", "has privileges" APIs and CompositeRolesStore (for authentication).
2020-07-02 11:50:03 +10:00

34 lines
1.0 KiB
Plaintext

--
:api: clear-privileges-cache
:request: ClearPrivilegesCacheRequest
:response: ClearPrivilegesCacheResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Clear Privileges Cache API
[id="{upid}-{api}-request"]
==== Clear Privileges Cache Request
A +{request}+ supports defining the name of applications that the cache should be cleared for.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> the name of the application(s) for which the cache should be cleared
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Clear Privileges Cache Response
The returned +{response}+ allows to retrieve information about where the cache was cleared.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> the list of nodes that the cache was cleared on