Orbeon Forms uses caches for the following purposes:
- Caching of form definition metadata in the persistence layer
- [SINCE Orbeon Forms 2023.1]
- This is a true cache, which doesn't need to be replicated.
Orbeon Forms has traditionally used Ehcache 2.x. In recent versions, JCache API (JSR-107) support has been added.
By default, the following property is set and enables Ehcache 2.x:
With the Orbeon Forms versions that support it, you can enable JCache support with the following:
When this is set to
jcache, Orbeon Forms uses the default caching provider as provided by the JCache API. This means that you must provide, in the Orbeon Forms web app, your own JCache-compatible implementation. Orbeon Forms comes by default with Ehcache 3.x as implementation, but you do not have to use Ehcache 3.x.
You can further specify the configuration to use with the following properties:
<property as="xs:string" name="oxf.xforms.cache.jcache.classname" value=""/>
<property as="xs:string" name="oxf.xforms.cache.jcache.resource" value=""/>
<property as="xs:string" name="oxf.xforms.cache.jcache.uri" value=""/>
oxf.xforms.cache.jcache.classnamespecifies a regular expression that must match the provider fully-qualified class name. This is useful in case there is more than one cache provider in the classpath and you need to select a specific one.
oxf.xforms.cache.jcache.resourcespecifies the path to a webapp resource. The configuration can be stored under the web app's WEB-INF or a JAR file included in the webapp.
oxf.xforms.cache.jcache.urispecifies the URI to a configuration.
resourceproperty is checked first, then the
uriproperty. A blank property is ignored.
For example, to point to the built-in Ehcache 3.x configuration, set:
If you are using a different JCache-compatible implementation, different values for the
oxf.xforms.cache.uriproperties might be needed.