Merge pull request #19 from mposolda/master

KEYCLOAK-3825 Update about cache docs
This commit is contained in:
Marek Posolda 2016-11-25 22:02:52 +01:00 committed by GitHub
commit 6c4e8d97a2
2 changed files with 36 additions and 30 deletions

View file

@ -2,5 +2,5 @@
=== Clearing Caches at Runtime === Clearing Caches at Runtime
To clear the realm or user cache, go to the {{book.project.name}} admin console Realm Settings->Cache Config page. To clear the realm or user cache, go to the {{book.project.name}} admin console Realm Settings->Cache Config page.
On this page you can clear the realm cache or the user cache. On this page you can clear the realm cache, the user cache or cache of external public keys.
This will clear the caches for all realms and not only the selected realm. This will clear the caches for all realms and not only the selected realm.

View file

@ -17,14 +17,18 @@ _domain.xml_ depending on your <<fake/../../operating-mode.adoc#_operating-mode,
<cache-container name="keycloak" jndi-name="infinispan/Keycloak"> <cache-container name="keycloak" jndi-name="infinispan/Keycloak">
<local-cache name="realms"/> <local-cache name="realms"/>
<local-cache name="users"> <local-cache name="users">
<eviction max-entries="10000" strategy="LRU"/> <eviction strategy="LRU" max-entries="10000"/>
</local-cache> </local-cache>
<local-cache name="sessions"/> <local-cache name="sessions"/>
<local-cache name="offlineSessions"/> <local-cache name="offlineSessions"/>
<local-cache name="loginFailures"/> <local-cache name="loginFailures"/>
<local-cache name="work"/> <local-cache name="work"/>
<local-cache name="realmVersions"> <local-cache name="authorization">
<transaction mode="BATCH" locking="PESSIMISTIC"/> <eviction strategy="LRU" max-entries="100"/>
</local-cache>
<local-cache name="keys">
<eviction strategy="LRU" max-entries="1000"/>
<expiration max-idle="3600000"/>
</local-cache> </local-cache>
</cache-container> </cache-container>
---- ----
@ -36,19 +40,21 @@ _domain.xml_ depending on your <<fake/../../operating-mode.adoc#_operating-mode,
<subsystem xmlns="urn:jboss:domain:infinispan:4.0"> <subsystem xmlns="urn:jboss:domain:infinispan:4.0">
<cache-container name="keycloak" jndi-name="infinispan/Keycloak"> <cache-container name="keycloak" jndi-name="infinispan/Keycloak">
<transport lock-timeout="60000"/> <transport lock-timeout="60000"/>
<local-cache name="realms" /> <local-cache name="realms"/>
<local-cache name="users"> <local-cache name="users">
<eviction max-entries="10000" strategy="LRU"/> <eviction max-entries="10000" strategy="LRU"/>
</local-cache> </local-cache>
<distributed-cache name="sessions" mode="SYNC" owners="1"/> <distributed-cache name="sessions" mode="SYNC" owners="1"/>
<distributed-cache name="offlineSessions" mode="SYNC" owners="1"/> <distributed-cache name="offlineSessions" mode="SYNC" owners="1"/>
<distributed-cache name="loginFailures" mode="SYNC" owners="1"/> <distributed-cache name="loginFailures" mode="SYNC" owners="1"/>
<distributed-cache name="authorization" mode="SYNC" owners="1"/>
<replicated-cache name="work" mode="SYNC"/> <replicated-cache name="work" mode="SYNC"/>
<local-cache name="realmVersions"> <local-cache name="keys">
<transaction mode="BATCH" locking="PESSIMISTIC"/> <eviction max-entries="1000" strategy="LRU"/>
<expiration max-idle="3600000"/>
</local-cache> </local-cache>
</cache-container> </cache-container>
---- ----
To limit or expand the number of allowed entries simply add, edit, or remove the `eviction` element from the `invalidation-cache` or To limit or expand the number of allowed entries simply add, edit, or remove the `eviction` element or the `expiration` element of particular cache
`distributed-cache` declaration you want to change. configuration.