[id='caching-security-realms_{context}']
= Security realm caching

Security realms implement caching to avoid having to repeatedly retrieve data which usually changes very infrequently.
By default

[discrete]
== Realm caching realm configuration

.XML
[source,xml,options="nowrap",subs=attributes+,role="primary"]
----
include::xml/server_realm_caching.xml[]
----

.JSON
[source,json,options="nowrap",subs=attributes+,role="secondary"]
----
include::json/server_realm_caching.json[]
----

.YAML
[source,yaml,options="nowrap",subs=attributes+,role="secondary"]
----
include::yaml/server_realm_caching.yaml[]
----

== Flushing realm caches

Use the CLI to flush security realm caches across the whole cluster.

[source,options="nowrap",subs=attributes+]
----
[node-1@mycluster//containers/default]> server aclcache flush
----
