This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Update docs and comments

  • Loading branch information...
seanf committed May 16, 2016
1 parent 67398e9 commit 05baee28312026e77e9984c6ea35d8cbd3c62381
@@ -1,9 +1,11 @@
# Infinispan for caching
Zanata uses Infinispan to manage its internal data caches and search indexes. Configuration for these caches happens in JBoss' `standalone/configuration/standalone.xml`. There are two different caches that need to be configured for Zanata:
Zanata uses Infinispan to manage its internal data caches and Hibernate entity caches. Configuration for these caches happens in JBoss' `standalone/configuration/standalone.xml`. There are two different caches that need to be configured for Zanata:
1. Hibernate search Indexes
1. Other internal data caches
1. Hibernate entity caches - defaults provided by the platform
1. Custom Zanata caches (eg translation statistics)
## Custom Zanata caches
The Infinispan configuration will be located inside the following module in `standalone.xml`:
@@ -15,33 +17,6 @@ The Infinispan configuration will be located inside the following module in `sta
Keep in mind that the module version may vary depending on your JBoss version.
### Hibernate Cache
The following is the recommended configuration for the Hibernate cache:
```xml
...
<cache-container name="hibernate" default-cache="local-query" jndi-name="java:jboss/infinispan/container/hibernate" start="EAGER" module="org.jboss.as.jpa.hibernate:4">
<local-cache name="entity">
<transaction mode="NON_XA"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="local-query">
<transaction mode="NONE"/>
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="timestamps">
<transaction mode="NONE"/>
<eviction strategy="NONE"/>
</local-cache>
</cache-container>
...
```
### Other internal data caches
```xml
...
<cache-container name="zanata" default-cache="default" jndi-name="java:jboss/infinispan/container/zanata"
@@ -53,10 +53,10 @@
<class>org.zanata.model.tm.TransMemory</class>
<class>org.zanata.model.WebHook</class>
<!-- TODO This may be removed once the class files are packaged in the zanata-model jar as intended
Otherwise, hibernate will scan the whole war file and dependency jars -->
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<!-- TODO This may be removed once the class files are packaged in the zanata-model jar as intended.
Otherwise, Hibernate will scan the whole war file and dependency jars. -->
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>

0 comments on commit 05baee2

Please sign in to comment.