Merge pull request #2197 from abstractj/KEYCLOAK-2452
Server Cache documentation is out of date
This commit is contained in:
commit
5ff266b148
1 changed files with 19 additions and 34 deletions
|
@ -25,61 +25,46 @@
|
||||||
<section>
|
<section>
|
||||||
<title>Disabling Caches</title>
|
<title>Disabling Caches</title>
|
||||||
<para>
|
<para>
|
||||||
The realm and user caches can be disabled through configuration or through the management console. To
|
The realm and user caches can be cleared through the management console. To
|
||||||
manally disable the realm or user cache, you must edit the <literal>keycloak-server.json</literal> file
|
disable the realm or user cache, you must edit the <literal>keycloak-server.json</literal> file
|
||||||
in your distribution. Here's what the config looks like initially.
|
in your distribution. Here's what the config looks like initially.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<programlisting><![CDATA[
|
<programlisting><![CDATA[
|
||||||
"realmCache": {
|
"userCache": {
|
||||||
"provider": "${keycloak.realm.cache.provider:mem}"
|
"infinispan" : {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"userCache": {
|
"realmCache": {
|
||||||
"provider": "${keycloak.user.cache.provider:mem}",
|
"infinispan" : {
|
||||||
"mem": {
|
"enabled": true
|
||||||
"maxSize": 20000
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]]></programlisting>
|
]]></programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>You must then change it to:
|
<para>You must then change it to:
|
||||||
<programlisting><![CDATA[
|
<programlisting><![CDATA[
|
||||||
"realmCache": {
|
"userCache": {
|
||||||
"provider": "${keycloak.realm.cache.provider:none}"
|
"infinispan" : {
|
||||||
|
"enabled": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"userCache": {
|
"realmCache": {
|
||||||
"provider": "${keycloak.user.cache.provider:none}"
|
"infinispan" : {
|
||||||
|
"enabled": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
]]></programlisting>
|
]]></programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
You can also disable either of the caches at runtime through the Keycloak admin console Realm Settings page.
|
|
||||||
This will not permanently disable the cache. If you reboot the server, the cache will be re-enabled unless
|
|
||||||
you manualy disable the cache in the <literal>keycloak-server.json</literal> file.
|
|
||||||
</para>
|
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<title>Clear Caches</title>
|
<title>Clear Caches</title>
|
||||||
<para>
|
<para>
|
||||||
To clear the realm or user cache, go to the Keycloak admin console Realm Settings->Cache Config page. Disable the cache
|
To clear the realm or user cache, go to the Keycloak admin console Realm Settings->Cache Config page. Disable the cache
|
||||||
you want. Save the settings. Then re-enable the cache. This will cause the cache to be cleared.
|
you want. This will cause the cache to be cleared.
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<title>Cache Config</title>
|
|
||||||
<para>
|
|
||||||
Cache configuration is done within <literal>keycloak-server.json</literal>. Changes to this file will not
|
|
||||||
be seen by the server until you reboot. Currently you can only configure the max size of the user cache.
|
|
||||||
<programlisting><![CDATA[
|
|
||||||
"userCache": {
|
|
||||||
"provider": "${keycloak.user.cache.provider:mem}",
|
|
||||||
"mem": {
|
|
||||||
"maxSize": 20000
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]]></programlisting>
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
Loading…
Reference in a new issue