Orbeon Forms
  • Getting started
  • Installation
    • Logging
    • Configuration banner
    • Docker
    • Azure
    • Tomcat
    • WildFly
    • WebSphere
    • WebLogic
    • GlassFish
    • Caches
    • Replication
    • Upgrading
  • Configuration
    • Properties
      • General
        • HTTP client
      • Form Runner
        • Detail page
          • Attachments
          • Email properties
          • PDF
          • Table of contents
        • Persistence
        • Summary page
      • Form Builder
      • XForms
    • Advanced
      • Workflows
      • Session management
      • State handling
      • Client-side error handling
      • Clustering and High Availability
      • Configuring a Form Runner eXist database
      • Creating a production WAR
      • Environments
      • JavaScript and CSS assets
      • Limiter filter
      • Run modes
      • Security
        • Content-Security-Policy header
      • SAP Hybris Module
      • XForms logging
    • Troubleshooting
      • Troubleshooting with the orbeon.log
      • Memory and threads
      • Relational database logging
      • Misc
  • Form Builder
    • Form settings
      • Time window
    • Form editor
      • Form area
      • Toolbox
      • Buttons bar
      • Control settings
      • Dependent fields and sections
      • Validation
      • Choices editor
      • Publishing
      • Cut, copy and paste
      • Section and grid settings
      • Section settings
      • Grid settings
      • Quick control search
      • Repeat settings
      • Repeated grids
      • Undo and redo
      • Keyboard shortcuts
    • Formulas
      • Examples of formulas
      • Formulas inspector
      • Formulas console
    • Summary page
    • Form localization
    • Advanced
      • Edit source
      • Services and actions
        • HTTP services
        • Database services
        • Simple Actions
        • Action Syntax
        • Action Syntax examples
        • Synchronizing repeated content
      • Testing a form in web mode
      • Testing PDF production
      • Testing offline functionality
      • Email Settings dialog
      • Field-level encryption
      • Messages
      • Section templates
      • Template syntax
      • XML Schemas support
      • Extensibility
        • Extension API
        • Integration
        • Toolbox component metadata
  • Form Runner
    • Overview
      • Terminology
    • Pages
      • Landing page
      • Published Forms page
      • Forms Admin page
      • Summary page
    • Components
      • Alert dialog
      • Attachment
      • Autocomplete
      • Captcha
      • Character counter
      • Checkbox input
      • Currency
      • Date
      • Dropdown date
      • Static and dynamic dropdown
      • Error summary
      • Grid
      • Handwritten signature
      • Hidden field
      • Image
      • Image annotation
      • Image attachment
      • Number
      • Open selection
      • Repeater
      • Formatted Text / Rich Text Editor
      • Section
      • Single-selection tree
      • Source code editor
      • Time
      • US phone
      • US state
      • Video
      • Video attachment
      • Wizard
      • XForms inspector
      • Yes/No answer
    • Features
      • Automatic calculations dependencies
      • Datasets
      • Excel and XML import
      • Excel and XML export
      • Summary page Excel Export
      • Form definitions and form data Zip Export
      • Purging historical data
      • Lease
      • Localization
      • Supported languages
      • Mobile support
      • Multitenancy
      • Form Runner navigation bar
      • PDF production
        • Automatic PDF
        • Automatic PDF header and footer configuration
        • PDF templates
      • Responsive design
      • Revision history
      • S3 storage
      • Simple data migration
      • TIFF production
      • Versioning
      • Wizard view
      • Workflow stage
    • Persistence
      • Using a relational database
      • Relational database schema
      • Purging old data using SQL
      • Auditing
      • Autosave
      • Database support
      • Flat view
    • Linking and embedding
      • Linking
      • Java Embedding API
      • JavaScript Embedding API
      • Liferay full portlet
      • Liferay proxy portlet
      • Securing Form Runner access
      • Form Runner offline embedding API
      • Angular component
      • React component
    • Access control and permissions
      • Users
      • Login & Logout
      • Deployed forms
      • Form fields
      • Editing forms
      • Owner and group member
      • Organizations
      • Scenarios
      • Token-based permissions
    • Styling
      • CSS
      • Grids CSS
      • Automatic PDF styling and CSS
    • APIs
      • Authentication of server-side service APIs
      • Persistence API
        • CRUD API
        • Search API
        • List form data attachments API
        • Form Metadata API
        • Lease API
        • Reindexing API
        • Caching
        • Versioning
        • Revision History API
        • Zip Export API
        • Custom persistence providers
      • Other APIs
        • Connection context API
        • Duplicate form data API
        • File scan API
        • Form Runner JavaScript API
        • Generate XML Schema API
        • PDF API
        • Publish form definition API
        • Run form in the background API
      • Data formats
        • Form data
        • Date and time
        • Form definition
    • Architecture and integration
      • Architecture
      • Access form data
      • Integration
    • Advanced
      • Buttons and processes
        • Simple process syntax
        • Core actions
        • Form Runner actions
          • Save action
          • Send action
          • Email action
        • XForms actions
        • Predefined buttons, processes and dialogs
        • Summary page buttons and processes
      • Custom dialogs/model logic
      • Services
      • Singleton form
      • Monitoring HTTP requests
  • XForms
    • Core
      • Attribute Value Templates (AVTs)
      • Binds
      • Validation
      • Variables
      • Keyboard focus
      • XForms JavaScript API
      • Error handling
        • Detailed behavior
      • Model-Bind variables
      • XForms 2.0 support
    • Events
      • Standard support
      • UI refresh events
      • Keyboard events
      • Extension events
      • Extension context information
      • Other event extensions
    • Actions
      • Repeat, insert and delete
      • Scripting actions
      • Extensions
    • Controls
      • Label, hint, help
      • Input
      • Output
      • Text area
      • Button
      • Upload
      • Dialog
    • Submission
      • Standard support
      • JSON support
      • Asynchronous submissions
      • Caching extension
      • Other submission extensions
    • XPath
      • Type annotations
      • Expression analysis
      • Tips
      • Compatibility
      • Standard functions
      • Maps and arrays Functions
      • Extension functions
        • Core functions
        • Utility functions
        • Model functions
        • Controls functions
        • XML functions
        • JSON functions
        • HTTP functions
        • Form Runner functions
        • Other functions
        • Deprecated functions
    • XBL components
      • FAQ
      • Guide
        • XBL Tutorial
        • Bindings
        • XForms models
        • Including content
        • Event handling
        • Conventions
        • Map XBL example
        • Learning from existing components
      • Advanced topics
        • XBL Modes
        • JavaScript companion classes
        • XBL library
        • Extensions
        • Attachment controls
    • XForms tutorial
      • Introduction
      • Installation
      • The Hello application
      • The Bookcast application
        • The basic app
        • Database access
        • Polishing the app
        • Adding a feed
    • Using XForms from Java apps
  • XML Platform
    • Page Flow Controller
      • Basics
      • XML submission
      • Navigating between pages
      • Paths and matchers
      • Other configuration elements
      • Typical combinations of page model and page view
      • Examples
      • Authorizing pages and services
    • Processors
      • URL generator
      • Request generator
      • PDF to image converter
    • Resources
      • Resource managers
      • Setting up an external resources directory
    • Other
      • Binary and text documents
  • FAQ
    • Licensing
    • PE and Dev Support
    • Form Builder and Form Runner
    • Resources and support
    • Other technical questions
  • Contributors
    • Automated tests
    • Building Orbeon Forms
    • Localizing Orbeon Forms
    • Validation functions
    • Contributor License Agreement
  • Release notes
    • Orbeon Forms 2022.1.9
    • Orbeon Forms 2024.1.1
    • Orbeon Forms 2023.1.7
    • Orbeon Forms 2024.1
    • Orbeon Forms 2023.1.6
    • Orbeon Forms 2023.1.5
    • Orbeon Forms 2021.1.11
    • Orbeon Forms 2022.1.8
    • Orbeon Forms 2023.1.4
    • Orbeon Forms 2023.1.3
    • Orbeon Forms 2023.1.2
    • Orbeon Forms 2022.1.7
    • Orbeon Forms 2023.1.1
    • Orbeon Forms 2023.1
    • Orbeon Forms 2022.1.6
    • Orbeon Forms 2021.1.10
    • Orbeon Forms 2022.1.5
    • Orbeon Forms 2021.1.9
    • Orbeon Forms 2022.1.4
    • Orbeon Forms 2022.1.3
    • Orbeon Forms 2021.1.8
    • Orbeon Forms 2022.1.2
    • Orbeon Forms 2022.1.1
    • Orbeon Forms 2022.1
    • Orbeon Forms 2021.1.7
    • Orbeon Forms 2021.1.6
    • Orbeon Forms 2021.1.5
    • Orbeon Forms 2021.1.4
    • Orbeon Forms 2021.1.3
    • Orbeon Forms 2021.1.2
    • Orbeon Forms 2021.1.1
    • Orbeon Forms 2021.1
    • Orbeon Forms 2020.1.6
    • Orbeon Forms 2019.2.4
    • Orbeon Forms 2019.1.2
    • Orbeon Forms 2018.2.5
    • Orbeon Forms 2018.1.4
    • Orbeon Forms 2020.1.5
    • Orbeon Forms 2020.1.4
    • Orbeon Forms 2020.1.3
    • Orbeon Forms 2020.1.2
    • Orbeon Forms 2019.2.3
    • Orbeon Forms 2020.1.1
    • Orbeon Forms 2020.1
    • Orbeon Forms 2019.2.2
    • Orbeon Forms 2019.2.1
    • Orbeon Forms 2019.1.1
    • Orbeon Forms 2019.2
    • Orbeon Forms 2019.1
    • Orbeon Forms 2018.2.4
  • Release history
  • Use cases
  • Product roadmap
  • Index of features
Powered by GitBook
On this page
  • In-memory caches
  • Other caches used by Orbeon Forms
  • Supported cache implementations
  • Using the default Ehcache 2.x configuration
  • Enabling JCache providers
  • Persistence layer caching of form definition metadata
  • See also
  1. Installation

Caches

In-memory caches

Orbeon Forms uses in-memory caches for data structures associated with forms and form state:

  • Compiled forms

    • This is the result of compiling the form definition. It is a data structure shared amongst all users of a form.

    • The size of this cache is controlled by the oxf.xforms.cache.static-state.size property and defaults to 50.

    • If a compiled form is evicted from the cache, it is serialized to the xforms.state store, from which it can be reloaded and reconstructed when needed.

  • Form sessions

    • A form session represents one interactive session of a specific user with a specific form. This is not shared between users of a given form.

    • The size of this cache is controlled by the oxf.xforms.cache.documents.size property and defaults to 50.

    • For testing purposes, this can be turned off with the oxf.xforms.cache.document property, but this is not recommended.

    • If a form session is evicted from the cache, it is stored in the xforms.state store, from which it can be reloaded and reconstructed when needed.

    • Whe a user session expires (that is, an application server session expires), the corresponding form sessions are evicted from the cache.

The default size of oxf.xforms.cache.static-state.size or oxf.xforms.cache.documents.size is fairly small. You definitely will want to consider what size to use for your deployment. If possible, set:

  • oxf.xforms.cache.static-state.size to the number of distinct published form definitions you have in production (or slightly larger, for example 10-25% larger).

  • oxf.xforms.cache.documents.size to the number of concurrent users you expect to have (or slightly larger, for example 10-25% larger).

IMPORTANT: Performance will suffer if any of the data in the in-memory caches needs to be reconstructed from the xforms.state store.

However, there is a trade-off between performance and memory usage. The larger the cache, the more memory is used.

Other caches used by Orbeon Forms

  • Form state

    • This includes form data and other form state as the user interacts with a form.

    • This cache acts as a store: some information cannot be reconstructed from other sources.

    • This is configured by the xforms.state cache.

  • Mapping of some web resources

    • This is configured by the xforms.resources cache.

    • This cache acts as a store: some information cannot be reconstructed from other sources.

  • Caching of form definition metadata in the persistence layer

    • This is configured by the form-runner.persistence.form-definition and form-runner.persistence.form-metadata caches.

    • This is a true cache, which doesn't need to be replicated.

Supported cache implementations

Orbeon Forms has traditionally used Ehcache 2.x. In recent versions, JCache API (JSR-107) support has been added.

Orbeon Forms Version
Ehcache 2.x Support
JCache Support
Default

2023.1 and newer

Yes

Yes

Ehcache 2.x

2022.1.5 and newer

Yes

Yes

Ehcache 2.x

2021.1.9 and newer

Yes

Yes

Ehcache 2.x

2022.1.4 and earlier

Yes

No

Ehcache 2.x

2021.1.8 and earlier

Yes

No

Ehcache 2.x

2020.1.x and earlier

Yes

No

Ehcache 2.x

Using the default Ehcache 2.x configuration

By default, the following property is set and enables Ehcache 2.x:

<property
    as="xs:string"
    name="oxf.xforms.cache.provider"
    value="ehcache2"/>

An internal ehcache.xml configuration file is used. Here are the default configuration files:

Enabling JCache providers

With the Orbeon Forms versions that support it, you can enable JCache support with the following:

<property
    as="xs:string"
    name="oxf.xforms.cache.provider"
    value="jcache"/>

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.classname specifies 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.resource specifies 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.uri specifies the URI to a configuration.

Example:

<property
    as="xs:string"
    name="oxf.xforms.cache.jcache.classname"                
    value=".*EhcacheCachingProvider"/>

The resource property is checked first, then the uri property. A blank property is ignored.

For example, to point to the built-in Ehcache 3.x configuration, set:

<property 
    as="xs:string"  
    name="oxf.xforms.cache.jcache.resource" 
    value="/ehcache3.xml"/>

NOTE: The Ehcache 3 JAR file is already included in Orbeon Forms. Java packages are different, and therefore the Ehcache 2.x and Ehcache 3.x JAR files do not conflict.

If you are using a different JCache-compatible implementation:

  • Different values for the oxf.xforms.cache.jcache.resource and/or oxf.xforms.cache.jcache.uri properties might be needed.

  • Add the property mentioned below to disable caching of form definitions, as we don't want cached form definitions to be replicated.

Persistence layer caching of form definition metadata

This cache is enabled by default. To disable it, set the following property:

<property
    as="xs:boolean"
    name="oxf.fr.persistence.form-definition-cache.enable"
    value="false"/>

This property enables access to caches with the following names, configured either in ehcache.xml or in the JCache configuration:

  • form-runner.persistence.form-definition

  • form-runner.persistence.form-metadata

See also

PreviousGlassFishNextReplication

Last updated 7 days ago

For more information on these configuration properties, see .

Orbeon Forms also uses the following caches that use an underlying cache implementation and configuration, such as Ehcache or through the JCache API (see below):

This must be replicated when is enabled.

This must be replicated when is enabled.

See below.

You can update that configuration by placing your own ehcache.xml file in the WEB-INF/resources/config directory of your web app. This is rarely needed, except for enabling .

When you call the , Form Runner can cache accesses to form definition metadata. This is done to avoid having to load the form definition from the database on each persistence API call. This cache is not replicated, and is local to each Orbeon Forms instance.

One reason to disable this cache might be if you perform accesses to the database from outside of Orbeon Forms, and you want to make sure that you always get the latest form definition. However, we recommend using the instead.

Blog post:

Configuring state handling
replication
replication
[SINCE Orbeon Forms 2023.1]
as of Orbeon Forms 2022.1.4
as of Orbeon Forms 2023.1
replication
[SINCE Orbeon Forms 2023.1]
[SINCE Orbeon Forms 2023.1]
Form Runner persistence API
Form Runner persistence API
State Handling
Installation
Replication
High-Availability Thanks to State Replication
Clustering and High Availability
Form Runner persistence API
Supported cache implementations
Persistence layer caching of form definition metadata