urn:infinispan:config:9.2

infinispan

Defines the configuration for Infinispan, for the cache manager configuration, for the default cache, and for named caches.

jgroups?

Defines JGroups stacks.

Defines JGroups transport stacks.
NameTypeDefaultDescription
transportstringorg.infinispan.remoting.transport.jgroups.JGroupsTransportClass that represents a network transport. Must implement org.infinispan.remoting.transport.Transport.

stack-file+

Defines an individual JGroups stack, pointing to the file containing its definition.
NameTypeDefaultDescription
namestringName of the stack, to be referenced by transport's stack attribute.
pathstringPath of JGroups configuration file containing stack definition.

threads?

Defines the threading subsystem.

The threading subsystem, used to declare manageable thread pools and resources.

thread-factory*

A thread factory (implementing java.util.concurrent.ThreadFactory). The "name" attribute is the bean name of the created thread factory. The optional "priority" attribute may be used to specify the thread priority of created threads. The optional "group-name" attribute specifies the name of a the thread group to create for this thread factory. The "thread-name-pattern" is the template used to create names for threads. The following patterns may be used: %% - emit a percent sign %t - emit the per-factory thread sequence number %g - emit the global thread sequence number %f - emit the factory sequence number %i - emit the thread ID %G - emit the thread group name
NameTypeDefaultDescription
namestring
group-namestring
thread-name-patternstring
prioritystring

blocking-bounded-queue-thread-pool*

A thread pool executor with a bounded queue. Such a thread pool has a core size and a queue with an upper bound. When a task is submitted, if the number of running threads is less than the core size, a new thread is created. Otherwise, the task is placed in queue. If too many tasks are allowed to be submitted to this type of executor, an out of memory condition may occur. The "name" attribute is the bean name of the created executor. The "max-threads" attribute must be used to specify the maximum thread pool size. The "core-threads" attribute defines the number of threads to keep in the pool. The nested "keepalive-time" element may used to specify the amount of time that pool threads should be kept running when idle; if not specified, threads will run until the executor is shut down. The "thread-factory" element specifies the bean name of a specific thread factory to use to create worker threads.
NameTypeDefaultDescription
namestring
thread-factorystring
max-threadsint
core-threadsint
keepalive-timestring
queue-lengthstring

cached-thread-pool*

A thread pool executor that creates new threads as needed, but will reuse previously constructed threads when they are available. The "name" attribute is the bean name of the created executor. The "thread-factory" element specifies the bean name of a specific thread factory to use to create worker threads.
NameTypeDefaultDescription
namestring
thread-factorystring

scheduled-thread-pool*

A thread pool executor that creates a single-threaded executor that can schedule commands to run after a given delay, or to execute periodically. The "name" attribute is the bean name of the created executor. The "thread-factory" element specifies the bean name of a specific thread factory to use to create worker threads.
NameTypeDefaultDescription
namestring
thread-factorystring

cache-container

Defines an embedded cache container.

NameTypeDefaultDescription
namestringUniquely identifies this cache container.
aliasesUnused XML attribute
jndi-namestringUnused XML attribute
default-cachestringIndicates the default cache for this cache container
startFIXMEUnused XML attribute
async-executorstringDefines the executor used for asynchronous cache operations.
listener-executorstringDefines the executor used for asynchronous cache listener notifications.
eviction-executorstringDEPRECATED Defines the scheduled executor used for evictions. The expiration-executor type should be used instead.
expiration-executorstringDefines the scheduled executor used for expirations.
persistence-executorstringConfiguration for the executor service used when interacting with the persistent store.
state-transfer-executorstringConfiguration for the executor service used when applying state from other nodes during the state transfer.
modulestringorg.jboss.as.clustering.infinispanUnused XML attribute
statisticsbooleantrueDetermines whether or not the cache container should collect statistics. Keep disabled for optimal performance.
shutdown-hook
DEFAULTUse the default shutdown hook behaviour (REGISTER)
REGISTERRegister a shutdown hook
DONT_REGISTERDon't register a shutdown hook
Behavior of the JVM shutdown hook registered by the cache

transport?

Overrides the transport characteristics for this cache container.

NameTypeDefaultDescription
stackstringDefines the jgroups stack used by the transport.
clusterstringDefines the name for the underlying group communication cluster.
executorstringDefines the executor used for asynchronous transport communication.
remote-command-executorstringConfiguration for the executor service used to execute remote commands. Use org.infinispan.executors.WithinThreadExecutorFactory to disable.
lock-timeoutlong240000 Infinispan uses a distributed lock to maintain a coherent transaction log during state transfer or rehashing, which means that only one cache can be doing state transfer or rehashing at the same time. This constraint is in place because more than one cache could be involved in a transaction. This timeout controls the time to wait to acquire a distributed lock.
node-namestring Name of the current node. This is a friendly name to make logs, etc. make more sense. Defaults to a combination of host name and a random number (to differentiate multiple nodes on the same host)
machinestring The id of the machine where this node runs.
rackstring The id of the rack where this node runs.
sitestring The id of the site where this node runs.
initial-cluster-sizeint The minimum number of nodes that must join the cluster for the cache manager to start
initial-cluster-timeoutlong The amount of time in milliseconds to wait for a cluster with sufficient nodes to form. Defaults to 60000

security?

Configures security for this cache container.

authorization?

Configures the global authorization role to permission mapping. The presence of this element in the configuration implicitly enables authorization.

NameTypeDefaultDescription
audit-loggerstring Class of the audit logger.

identity-role-mapper

Uses the identity role mapper where principal names are converted as-is into role names.

common-name-role-mapper

Uses the common name role mapper which assumes principal names are in Distinguished Name format and extracts the Common Name to use as a role

cluster-role-mapper

Uses the cluster role mapper which stores the principal to role mappings within the cluster registry.

custom-role-mapper

Uses a custom role mapper.

NameTypeDefaultDescription
classstring Class of the custom principal to role mapper

role*

Defines a new role name and assigns permissions to it.

NameTypeDefaultDescription
namestring Defines the name of the role.
permissions
LIFECYCLE Allows control of a cache's lifecycle (i.e. starting and stopping a cache)
READ Allows reading data from a cache
WRITE Allows writing data to a cache
EXEC Allows performing task execution (e.g. distributed executors, map/reduce) on a cache
LISTEN Allows attaching listeners to a cache
BULK_READ Allows bulk-read operations (e.g. obtaining all the keys in a cache)
BULK_WRITE Allows bulk-write operations (e.g. clearing a cache)
ADMIN Allows performing "administrative" operations on a cache
ALL Aggregate permission which implies all of the others
ALL_READ Aggregate permission which implies all read permissions (READ and BULK_READ)
ALL_WRITE Aggregate permission which implies all write permissions (WRITE and BULK_WRITE)
NONE Permission which means no permissions
Defines the list of permissions for the role.

serialization?

Specifies how data serialization will be performed by the cache container.

NameTypeDefaultDescription
marshallerstring Fully qualified name of the marshaller to use. It must implement org.infinispan.marshall.StreamingMarshaller
versionstring71 Largest allowable version to use when marshalling internal state. Set this to the lowest version cache instance in your cluster to ensure compatibility of communications. However, setting this too low will mean you lose out on the benefit of improvements in newer versions of the marshaller.

advanced-externalizer*

AdvancedExternalizer provides an alternative way to provide externalizers for marshalling/unmarshalling user defined classes that overcome the deficiencies of the more user-friendly externalizer definition model explained in Externalizer.

NameTypeDefaultDescription
classstring Class of the custom externalizer
idint Id of the custom externalizer

jmx?

Defines JMX management details.

NameTypeDefaultDescription
domainstringorg.infinispan If JMX statistics are enabled then all 'published' JMX objects will appear under this name. This is optional, if not specified an object name will be created for you by default.
mbean-server-lookupstringorg.infinispan.jmx.PlatformMBeanServerLookup Class that will attempt to locate a JMX MBean server to bind to. Defaults to using the platform MBean server.
duplicate-domainsbooleantrue If true, multiple cache manager instances could be configured under the same configured JMX domain. Each cache manager will in practice use a different JMX domain that has been calculated based on the configured one by adding an incrementing index to it.

property*

A jmx property with name and value to be passed to the MBean Server lookup instance.

global-state?

Defines the global state persistence configuration. If this element is not present, global state persistence will be disabled.

persistent-location?

Defines the filesystem path where persistent state data which needs to survive container restarts should be stored. The data stored at this location is required for graceful shutdown and restore. This path must NOT be shared among multiple instances. Defaults to the user.dir system property which usually is where the application was started. This value should be overridden to a more appropriate location.

NameTypeDefaultDescription
relative-tostringjboss.server.data.dirIgnored in embedded mode.
pathstring Defines the path where global state for this cache-container will be stored.

shared-persistent-location?

Defines the filesystem path where shared persistent state data which needs to survive container restarts should be stored. This path can be safely shared among multiple instances. Defaults to the user.dir system property which usually is where the application was started. This value should be overridden to a more appropriate location.

NameTypeDefaultDescription
relative-tostringjboss.server.data.dirIgnored in embedded mode.
pathstring Defines the path where global state for this cache-container will be stored.

temporary-location?

Defines the filesystem path where temporary state should be stored. Defaults to the value of the java.io.tmpdir system property.

NameTypeDefaultDescription
relative-tostringjboss.server.data.dirIgnored in embedded mode.
pathstring Defines the path where global state for this cache-container will be stored.

immutable-configuration-storage

An immutable configuration storage.

volatile-configuration-storage

A non-persistent configuration storage.

overlay-configuration-storage

A persistent configuration storage which saves runtime configurations to the persistent-location.

managed-configuration-storage

A persistent configuration storage for managed environments. This doesn't work in embedded mode.

custom-configuration-storage

Uses a custom configuration storage implementation.

NameTypeDefaultDescription
classstring Class of the custom configuration storage implementation.

local-cache

Defines a LOCAL mode cache.

NameTypeDefaultDescription
simple-cacheFIXMEfalse This cache will be using optimized (faster) implementation that does not support transactions/invocation batching, persistence, custom interceptors, indexing, store-as-binary or compatibility. Also, this type of cache does not support Map-Reduce jobs or Distributed Executor framework.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

local-cache-configuration

Defines a LOCAL mode cache configuration.

NameTypeDefaultDescription
simple-cacheFIXMEfalse This cache will be using optimized (faster) implementation that does not support transactions/invocation batching, persistence, custom interceptors, indexing, store-as-binary or compatibility. Also, this type of cache does not support Map-Reduce jobs or Distributed Executor framework.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

replicated-cache

Defines a REPL_* mode cache.

NameTypeDefaultDescription
segmentsint256Number of hash space segments (per cluster). The default value is 256, and should be at least 20 * cluster size.
consistent-hash-factorystring The factory to use for generating the consistent hash. Must implement `org.infinispan.distribution.ch.ConsistentHashFactory`. E.g. `org.infinispan.distribution.ch.impl.SyncConsistentHashFactory` can be used to guarantee that multiple distributed caches use exactly the same consistent hash, which for performance reasons is not guaranteed by the default consistent hash factory instance used.
key-partitionerstring The name of the key partitioner class. Must implement `org.infinispan.distribution.ch.KeyPartitioner`. A custom key partitioner can be used as an alternative to grouping, to guarantee that some keys are located in the same segment (and thus their primary owner is the same node). Since 8.2.

state-transfer?

The state transfer configuration for distribution and replicated caches.

NameTypeDefaultDescription
enabledbooleantrueIf enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time.
timeoutlong240000The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup.
chunk-sizeinteger512The number of cache entries to batch in each transfer.
await-initial-transferbooleantrueIf enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests.
NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

replicated-cache-configuration

Defines a REPL_* mode cache configuration.

NameTypeDefaultDescription
segmentsint256Number of hash space segments (per cluster). The default value is 256, and should be at least 20 * cluster size.
consistent-hash-factorystring The factory to use for generating the consistent hash. Must implement `org.infinispan.distribution.ch.ConsistentHashFactory`. E.g. `org.infinispan.distribution.ch.impl.SyncConsistentHashFactory` can be used to guarantee that multiple distributed caches use exactly the same consistent hash, which for performance reasons is not guaranteed by the default consistent hash factory instance used.
key-partitionerstring The name of the key partitioner class. Must implement `org.infinispan.distribution.ch.KeyPartitioner`. A custom key partitioner can be used as an alternative to grouping, to guarantee that some keys are located in the same segment (and thus their primary owner is the same node). Since 8.2.

state-transfer?

The state transfer configuration for distribution and replicated caches.

NameTypeDefaultDescription
enabledbooleantrueIf enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time.
timeoutlong240000The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup.
chunk-sizeinteger512The number of cache entries to batch in each transfer.
await-initial-transferbooleantrueIf enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests.
NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

invalidation-cache

Defines an INVALIDATION_* mode cache.

NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

invalidation-cache-configuration

Defines an INVALIDATION_* mode cache configuration.

NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

distributed-cache

Defines a DIST_* mode cache.

NameTypeDefaultDescription
ownersint2Number of cluster-wide replicas for each cache entry.
segmentsint256Number of hash space segments (per cluster). The default value is 256, and should be at least 20 * cluster size.
capacity-factordouble1.0Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. Value must be positive. The default is 1
l1-lifespanlongMaximum lifespan in milliseconds of an entry placed in the L1 cache. By default L1 is disabled unless a positive value is configured for this attribute. If the attribute is not present, L1 is disabled.
l1-cleanup-intervallong60000 Controls how often a cleanup task to prune L1 tracking data is run. Defaults to 10 minutes.
capacityfloat1.0 Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. This is just a suggestion, there is no guarantee that a node with a capacity factor of 2 will have twice as many entries as a node with a capacity factor of 1.
consistent-hash-factorystring The factory to use for generating the consistent hash. Must implement `org.infinispan.distribution.ch.ConsistentHashFactory`. E.g. `org.infinispan.distribution.ch.impl.SyncConsistentHashFactory` can be used to guarantee that multiple distributed caches use exactly the same consistent hash, which for performance reasons is not guaranteed by the default consistent hash factory instance used.
key-partitionerstring The name of the key partitioner class. Must implement `org.infinispan.distribution.ch.KeyPartitioner`. A custom key partitioner can be used as an alternative to grouping, to guarantee that some keys are located in the same segment (and thus their primary owner is the same node). Since 8.2.

state-transfer?

The state transfer configuration for distribution and replicated caches.

NameTypeDefaultDescription
enabledbooleantrueIf enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time.
timeoutlong240000The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup.
chunk-sizeinteger512The number of cache entries to batch in each transfer.
await-initial-transferbooleantrueIf enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests.

groups?

Configures grouping of data.

NameTypeDefaultDescription
enabledboolean Enables or disables grouping.

grouper*

NameTypeDefaultDescription
classstring The class to use to group keys. Must implement org.infinispan.distribution.group.Grouper.
NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

distributed-cache-configuration

Defines a DIST_* mode cache configuration.

NameTypeDefaultDescription
ownersint2Number of cluster-wide replicas for each cache entry.
segmentsint256Number of hash space segments (per cluster). The default value is 256, and should be at least 20 * cluster size.
capacity-factordouble1.0Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. Value must be positive. The default is 1
l1-lifespanlongMaximum lifespan in milliseconds of an entry placed in the L1 cache. By default L1 is disabled unless a positive value is configured for this attribute. If the attribute is not present, L1 is disabled.
l1-cleanup-intervallong60000 Controls how often a cleanup task to prune L1 tracking data is run. Defaults to 10 minutes.
capacityfloat1.0 Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. This is just a suggestion, there is no guarantee that a node with a capacity factor of 2 will have twice as many entries as a node with a capacity factor of 1.
consistent-hash-factorystring The factory to use for generating the consistent hash. Must implement `org.infinispan.distribution.ch.ConsistentHashFactory`. E.g. `org.infinispan.distribution.ch.impl.SyncConsistentHashFactory` can be used to guarantee that multiple distributed caches use exactly the same consistent hash, which for performance reasons is not guaranteed by the default consistent hash factory instance used.
key-partitionerstring The name of the key partitioner class. Must implement `org.infinispan.distribution.ch.KeyPartitioner`. A custom key partitioner can be used as an alternative to grouping, to guarantee that some keys are located in the same segment (and thus their primary owner is the same node). Since 8.2.

state-transfer?

The state transfer configuration for distribution and replicated caches.

NameTypeDefaultDescription
enabledbooleantrueIf enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time.
timeoutlong240000The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup.
chunk-sizeinteger512The number of cache entries to batch in each transfer.
await-initial-transferbooleantrueIf enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests.

groups?

Configures grouping of data.

NameTypeDefaultDescription
enabledboolean Enables or disables grouping.

grouper*

NameTypeDefaultDescription
classstring The class to use to group keys. Must implement org.infinispan.distribution.group.Grouper.
NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

scattered-cache

Defines a SCATTERED_* mode cache. Since 9.0.

NameTypeDefaultDescription
segmentsint256Number of hash space segments (per cluster). The default value is 256, and should be at least 20 * cluster size.
capacityfloat1 Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. This is just a suggestion, there is no guarantee that a node with a capacity factor of 2 will have twice as many entries as a node with a capacity factor of 1.
consistent-hash-factorystring The factory to use for generating the consistent hash. Must implement `org.infinispan.distribution.ch.ConsistentHashFactory`. E.g. `org.infinispan.distribution.ch.impl.SyncConsistentHashFactory` can be used to guarantee that multiple distributed caches use exactly the same consistent hash, which for performance reasons is not guaranteed by the default consistent hash factory instance used.
key-partitionerstring The name of the key partitioner class. Must implement `org.infinispan.distribution.ch.KeyPartitioner`. A custom key partitioner can be used as an alternative to grouping, to guarantee that some keys are located in the same segment (and thus their primary owner is the same node). Since 8.2.
invalidation-batch-sizeinteger128 Threshold for sending batch invalidations. Once a node registers more updated keys, it sends a batch invalidation to all nodes requesting to remove old versions of the entries. The threshold is also used for second batch invalidation of tombstones for removed entries.

state-transfer?

The state transfer configuration for distribution and replicated caches.

NameTypeDefaultDescription
enabledbooleantrueIf enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time.
timeoutlong240000The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup.
chunk-sizeinteger512The number of cache entries to batch in each transfer.
await-initial-transferbooleantrueIf enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests.

groups?

Configures grouping of data.

NameTypeDefaultDescription
enabledboolean Enables or disables grouping.

grouper*

NameTypeDefaultDescription
classstring The class to use to group keys. Must implement org.infinispan.distribution.group.Grouper.
NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.

scattered-cache-configuration

Defines a SCATTERED_* mode cache configuration. Since 9.0.

NameTypeDefaultDescription
segmentsint256Number of hash space segments (per cluster). The default value is 256, and should be at least 20 * cluster size.
capacityfloat1 Controls the proportion of entries that will reside on the local node, compared to the other nodes in the cluster. This is just a suggestion, there is no guarantee that a node with a capacity factor of 2 will have twice as many entries as a node with a capacity factor of 1.
consistent-hash-factorystring The factory to use for generating the consistent hash. Must implement `org.infinispan.distribution.ch.ConsistentHashFactory`. E.g. `org.infinispan.distribution.ch.impl.SyncConsistentHashFactory` can be used to guarantee that multiple distributed caches use exactly the same consistent hash, which for performance reasons is not guaranteed by the default consistent hash factory instance used.
key-partitionerstring The name of the key partitioner class. Must implement `org.infinispan.distribution.ch.KeyPartitioner`. A custom key partitioner can be used as an alternative to grouping, to guarantee that some keys are located in the same segment (and thus their primary owner is the same node). Since 8.2.
invalidation-batch-sizeinteger128 Threshold for sending batch invalidations. Once a node registers more updated keys, it sends a batch invalidation to all nodes requesting to remove old versions of the entries. The threshold is also used for second batch invalidation of tombstones for removed entries.

state-transfer?

The state transfer configuration for distribution and replicated caches.

NameTypeDefaultDescription
enabledbooleantrueIf enabled, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time.
timeoutlong240000The maximum amount of time (ms) to wait for state from neighboring caches, before throwing an exception and aborting startup.
chunk-sizeinteger512The number of cache entries to batch in each transfer.
await-initial-transferbooleantrueIf enabled, this will cause the cache to wait for initial state transfer to complete before responding to requests.

groups?

Configures grouping of data.

NameTypeDefaultDescription
enabledboolean Enables or disables grouping.

grouper*

NameTypeDefaultDescription
classstring The class to use to group keys. Must implement org.infinispan.distribution.group.Grouper.
NameTypeDefaultDescription
mode
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
SYNCSets the clustered cache mode, ASYNC for asynchronous operation, or SYNC for synchronous operation.
remote-timeoutlong15000In SYNC mode, the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.

partition-handling?

Configures the way this cache reacts to node crashes and split brains.

NameTypeDefaultDescription
enabledboolean Deprecated, use type instead. Enable/disable the partition handling functionality. Defaults to false.
when-split
DENY_READ_WRITESIf the partition does not have all owners for a given segment, both reads and writes are denied for all keys in that segment.
ALLOW_READSAllows reads for a given key if it exists in this partition, but only allows writes if this partition contains all owners of a segment.
ALLOW_READ_WRITESAllow entries on each partition to diverge, with conflicts resolved during merge.
ALLOW_READ_WRITESThe type of actions that are possible when a split brain scenario is encountered.
merge-policyPREFERRED_ALWAYSThe entry merge policy which should be applied on partition merges.
NameTypeDefaultDescription
nameIDUniquely identifies this cache within its cache container.
configurationIDREFThe name of the cache configuration which this configuration inherits from.
startFIXMEUnused XML attribute
jndi-namestringUnused XML attribute
modulestringUnused XML attribute
statisticsbooleanfalseDetermines whether or not the cache should collect statistics. Keep disabled for optimal performance.
statistics-availablebooleantrueIf set to false, statistics gathering cannot be enabled during runtime. Keep disabled for optimal performance.
deadlock-detection-spinlong-1 Deprecated since 9.0, deadlock detection is always disabled.
unreliable-return-valuesbooleanfalse Specifies whether Infinispan is allowed to disregard the Map contract when providing return values for org.infinispan.Cache#put(Object, Object) and org.infinispan.Cache#remove(Object) methods.

backups?

The state transfer configuration for distribution and replicated caches.

backup*

Configures a specific site where this cache backups data.

NameTypeDefaultDescription
sitestringName of the remote site where this cache backups data.
strategy
ASYNCEnables asynchronous mode.
SYNCEnables synchronous mode.
ASYNCThe strategy used for backing up data: "SYNC" or "ASYNC". Defaults to "ASYNC"
failure-policy
IGNOREIgnore backup failures.
WARNWarn of backup failures.
FAILFail local operations when a backup failure occurs.
CUSTOMInvoke a user-specified failure policy (set via the failure-policy-class attribute)
WARNDecides what the system would do in case of failure during backup. Defaults to "WARN"
timeoutlong10000The timeout(millis) to be used when backing up data remotely. Defaults to 10 secs.
enabledbooleantrueIf 'false' then no data is backed up to this site. Defaults to 'true'.
two-phase-commitbooleanfalse Configures whether the replication happens in a 1PC or 2PC when using SYNC backup strategy. Defaults to "false". CacheConfigurationException is thrown when used with ASYNC backup strategy.
failure-policy-classstring If the 'backupFailurePolicy' is set to 'CUSTOM' then this attribute is required and should contain the fully qualified name of a class implementing org.infinispan.xsite.CustomFailurePolicy.

take-offline?

Determines whether this backup is taken offline (ignored) after a certain number of tries.

NameTypeDefaultDescription
after-failuresint0The number of failed request operations after which this site should be taken offline. Defaults to 0 (never). A negative value would mean that the site will be taken offline after 'min-wait'.
min-waitlong0The minimal number of millis to wait before taking this site offline, even in the case 'after-failures' is reached. If smaller or equal to 0, then only 'after-failures' is considered.

state-transfer?

Configures the properties needed to transfer the state for this site.

NameTypeDefaultDescription
chunk-sizeint512 If > 0, the state will be transferred in batches of {@code chunkSize} cache entries. If <= 0, the state will be transferred in all at once. Not recommended. Defaults to 512.
timeoutlong1200000 The time (in milliseconds) to wait for the backup site acknowledge the state chunk received and applied. Default value is 20 min.
max-retriesint30 The maximum number of retries when a push state command fails. A value <= 0 (zero) mean that the command will not retry. Default value is 30.
wait-timelong2000 The waiting time (in milliseconds) between each retry. The value should be > 0 (zero). Default value is 2 seconds.

backup-for?

Configures this cache as a backup for a remote cache.

NameTypeDefaultDescription
remote-cachestring The name of the remote cache that backups data here.
remote-sitestring The name of the remote site containing the cache that backups data here.

encoding?

The cache encoding configuration.

Defines content type and encoding for keys and values of the cache.

key

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

value

Describes the content-type and encoding.
NameTypeDefaultDescription
media-typestring

locking?

The locking configuration of the cache.

NameTypeDefaultDescription
isolation
NONENo locking isolation will be performed. This is only valid in local mode. In clustered mode, READ_COMMITTED will be used instead.
READ_UNCOMMITTEDUnsupported. Actually configures READ_COMMITTED
READ_COMMITTEDRead committed is an isolation level that guarantees that any data read is committed at the moment it is read. However, depending on the outcome of other transactions, successive reads may return different results
REPEATABLE_READRepeatable read is an isolation level that guarantees that any data read is committed at the moment it is read and that, within a transaction, successive reads will always return the same data.
SERIALIZABLEUnsupported. Actually configures REPEATABLE_READ
REPEATABLE_READSets the cache locking isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation level.
stripingbooleanfalseIf true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.
acquire-timeoutlong10000Maximum time to attempt a particular lock acquisition.
concurrency-levelint32Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interacting with Infinispan.
write-skewbooleantrue (Deprecated) This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception. Defaults to false.

transaction?

The cache transaction configuration.

NameTypeDefaultDescription
mode
NONECache will not enlist within transactions.
BATCHUses batching to group cache operations together.
NON_XACache will enlist within transactions as a javax.transaction.Synchronization
NON_DURABLE_XACache will enlist within transactions as a javax.transaction.xa.XAResource, without recovery.
FULL_XACache will enlist within transactions as a javax.transaction.xa.XAResource, with recovery.
NONESets the cache transaction mode to one of NONE, BATCH, NON_XA, NON_DURABLE_XA, FULL_XA.
stop-timeoutlong30000If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. The amount of time to wait for is defined by the cache stop timeout.
locking
OPTIMISTICEnables Optimistic locking.
PESSIMISTICEnables Pessimistic locking.
OPTIMISTICThe locking mode for this cache, one of OPTIMISTIC or PESSIMISTIC.
transaction-manager-lookupstringorg.infinispan.transaction.lookup.GenericTransactionManagerLookup Configure Transaction manager lookup directly using an instance of TransactionManagerLookup. Calling this method marks the cache as transactional.
complete-timeoutlong60000 The duration (millis) in which to keep information about the completion of a transaction. Defaults to 60000.
reaper-intervallong30000 The time interval (millis) at which the thread that cleans up transaction completion information kicks in. Defaults to 30000.
auto-commitbooleantrue If the cache is transactional and transactionAutoCommit is enabled then for single operation transactions the user doesn't need to manually start a transaction, but a transactions is injected by the system. Defaults to true.
protocol
DEFAULT
TOTAL_ORDER
Configures the commit protocol to use.
recovery-cachestring__recoveryInfoCacheName__ Sets the name of the cache where recovery related information is held. The cache's default name is "__recoveryInfoCacheName__"
notificationsbooleantrue Enables or disables triggering transactional notifications on cache listeners. By default is enabled.

eviction?

The cache eviction configuration.

DEPRECATED: please use memory element instead
NameTypeDefaultDescription
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
NONESets the cache eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU', 'LIRS' and 'NONE' (to disable eviction).
max-entrieslong-1Deprecated since 8.1. Use the size attribute instead.
thread-policy
PIGGYBACKFires the eviction events from the same thread which is performing the eviction
DEFAULTUse the default eviction listener thread policy (PIGGYBACK)
DEFAULT Threading policy for eviction. Defaults to using the DEFAULT eviction policy.
type
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
COUNTSpecifies whether to use entry count or memory-based approximation to decide when to evict entries.
sizelong-1Maximum size to use for eviction. When using the COUNT type, this is the maximum number of entries in a cache instance. When using the MEMORY threshold policy, this is the maximum number of allocated bytes used by a cache's datacontainer. A value of -1 means no limit. This is currently limited to 2^48 - 1 in size.

expiration?

The cache expiration configuration.

NameTypeDefaultDescription
max-idlelong-1Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.
lifespanlong-1Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.
intervallong60000Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set interval to -1.

compatibility?

The cache compatibility mode configuration.

NameTypeDefaultDescription
marshallerstringA marshaller to use for compatibility conversions.

store-as-binary?

Configures the cache to store data in binary format.

Controls whether when stored in memory, keys and values are stored as references to their original objects, or in a serialized, binary format. There are benefits to both approaches, but often if used in a clustered mode, storing objects as binary means that the cost of serialization happens early on, and can be amortized. Further, deserialization costs are incurred lazily which improves throughput. It is possible to control this on a fine-grained basis: you can choose to just store keys or values as binary, or both. DEPRECATED: please use memory element instead
NameTypeDefaultDescription
keysbooleantrue Specify whether keys are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.
valuesbooleantrue Specify whether values are stored as binary or not. Enabled by default if the "enabled" attribute is set to true.

persistence?

Configures the cache's persistence layer.

NameTypeDefaultDescription
passivationbooleanfalse If true, data is only written to the cache store when it is evicted from memory, a phenomenon known as 'passivation'. Next time the data is requested, it will be 'activated' which means that data will be brought back to memory and removed from the persistent store. This gives you the ability to 'overflow' to disk, similar to swapping in an operating system. If false, the cache store contains a copy of the contents in memory, so writes to cache result in cache store writes. This essentially gives you a 'write-through' configuration. Defaults to false.

cluster-loader

Defines a cluster cache loader.

NameTypeDefaultDescription
remote-timeoutlong15000The timeout when performing remote calls.
NameTypeDefaultDescription
namestringUnused XML attribute.
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.

property*

A cache loader property with name and value.

store

Defines a custom cache store.

NameTypeDefaultDescription
classstringThe class name of the cache store implementation.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

file-store

Defines a file-based cache store.

NameTypeDefaultDescription
max-entriesint Sets the maximum number of in-memory mappings between keys and their position in the store. Normally this is unlimited, but to avoid excess memory usage, an upper bound can be configured. If this limit is exceeded, entries are removed permanently using the LRU algorithm both from the in-memory index and the underlying file based cache store. Warning: setting this value may cause data loss.
relative-tostringUnused XML attribute
pathstring The path within "relative-to" in which to store the cache state. If undefined, the path defaults to the cache container name.
NameTypeDefaultDescription
sharedbooleanfalseThis setting should be set to true when multiple cache instances share the same cache store (e.g., multiple nodes in a cluster using a JDBC-based CacheStore pointing to the same, shared database.) Setting this to true avoids multiple cache instances writing the same modification multiple times. If enabled, only the node where the modification originated will write to the cache store. If disabled, each individual cache reacts to a potential remote update by storing the data to the cache store.
transactionalbooleanfalseThis setting should be set to true when the underlying cache store supports transactions and it is desirable for the underlying store and the cache to remain synchronized. With this enabled any Exceptions thrown whilst writing to the underlying store will result in both the store's and cache's transactions rollingback.
preloadbooleanfalseIf true, when the cache starts, data stored in the cache store will be pre-loaded into memory. This is particularly useful when data in the cache store will be needed immediately after startup and you want to avoid cache operations being delayed as a result of loading this data lazily. Can be used to provide a 'warm-cache' on startup, however there is a performance penalty as startup time is affected by this process.
fetch-statebooleanfalseIf true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled.
purgebooleanfalseIf true, purges this cache store when it starts up.
singletonbooleanfalseIf true, the singleton store cache store is enabled. SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. Deprecated: A shared store should be used instead, as this limits store writes to the primary owner of a key
read-onlybooleanfalseIf true, the cache store will only be used to load entries. Any modifications made to the caches will not be applied to the store.
max-batch-sizeint100The maximum size of a batch to be inserted/deleted from the store. If the value is less than one, then no upper limit is placed on the number of operations in a batch.

write-behind?

Configures a cache store as write-behind instead of write-through.

NameTypeDefaultDescription
modification-queue-sizeint1024 Maximum number of entries in the asynchronous queue. When the queue is full, the store becomes write-through. until it can accept new entries
thread-pool-sizeint1 Size of the thread pool whose threads are responsible for applying the modifications to the cache store.

property*

A cache store property with name and value.

versioning?

Controls whether entries are versioned. Versioning is necessary, for example, when using optimistic transactions in a clustered environment, to be able to perform write-skew checks.

NameTypeDefaultDescription
scheme
SIMPLE A simple versioning scheme that is cluster-aware
NONE Don't version entries
SIMPLE (Deprecated) The scheme to use when versioning entries. Can be either SIMPLE or NONE. Defaults to NONE

data-container?

Controls the data container for the cache.

NameTypeDefaultDescription
classstring DEPRECATED: this is to be removed in a future release Fully qualified class name of the data container to use
key-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for keys stored in the cache, which provides with custom ways to compare cached keys
value-equivalencestring DEPRECATED: this is to be removed in a future release Fully qualified class name of the Equivalence class to use for values stored in the cache, which provides with custom ways to compare cached values

property*

Properties passed to the data container

memory?

Controls how the entries are stored in memory

object

Store keys and values as instance variables. Instances of byte[] will be wrapped to ensure equality.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. Limits the cache to this normal by the amount of entries in the cache.
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

binary

Store keys and values as byte[] instances. Key and value will be serialized to binary representations.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.

off-heap

Store keys and values as byte[] off of the Java heap. Key and value will be serialized to binary representations and stored in native memory as to not take up Java heap. Temporary objects will be put onto Java heap temporarily until processing is completed.

NameTypeDefaultDescription
sizelong-1The size of the eviction cache as a long. If the configured type is COUNT, this will be how many entries can be stored. If the configured type is MEMORY, this will be how much memory in bytes can be stored.
eviction
COUNTEvicts entries from the cache when a specified count has been set
MEMORYEvicts entries from the cache when a specified memory usage has been reached. Memory usage is computed using an approximation which is tailored for the HotSpot VM. This can only be used when both key and values are stored as byte arrays. To guarantee only byte arrays are stored it is recommended to run with store as binary for both keys and values
The eviction type to use whether it is COUNT or MEMORY. COUNT will limit the cache based on the number of entries. MEMORY will limit the cache by how much memory the entries use
strategy
NONENever evict entries. This is the default.
MANUALEviction will be performed manually. Equivalent internally to NONE.
REMOVEEviction will be performed automatically to ensure that "older" entries are removed to make room for new entries.
EXCEPTIONEviction is not performed and instead when the container is full exceptions will prevent new entries from being written to the container. This cache must be transactional and now allow for commit optimizations that would prevent it from performing a two phase commit.
UNORDEREDDeprecated. Activates REMOVE policy.
FIFODeprecated. Activates REMOVE policy.
LRUDeprecated. Activates REMOVE policy.
LIRSDeprecated. Activates REMOVE policy.
The eviction strategy to use. This determines if eviction is even enabled or if it has a different variant.
address-countint1048576How many address pointers to use. This number will be rounded up to a power of two. For optimal performance you will want more address pointers than you expect to have entries. This is similar to the size of an array backing a hash map. Without collisions lookups and writes will be constant time. Each pointer will take up 8 bytes of memory thus the default will use 8 MB of off-heap memory.

indexing?

Defines indexing options for cache

NameTypeDefaultDescription
index
NONEDo not index data. This is the default.
LOCALOnly index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.
ALLIndex all data
PRIMARY_OWNEROnly index changes on the primary owner, regardless of it's local or remote.
NONEThe indexing mode of the cache. Defaults to NONE.
auto-configbooleanfalseWhether or not to apply automatic index configuration based on cache type

indexed-entities?

Defines the indexed entity classes

indexed-entity*

Indexed entity class name

property*

Property to pass on to the indexing system

custom-interceptors?

Configures custom interceptors to be added to the cache.

interceptor*

NameTypeDefaultDescription
afterstringDictates that the custom interceptor appears immediately after the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
beforestringDictates that the custom interceptor appears immediately before the specified interceptor. If the specified interceptor is not found in the interceptor chain, a ConfigurationException will be thrown when the cache starts.
classstringA fully qualified class name of the new custom interceptor to add to the configuration.
indexintSpecifies a position in the interceptor chain to place the new interceptor. The index starts at 0 and goes up to the number of interceptors in a given configuration. A ConfigurationException is thrown if the index is less than 0 or greater than the maximum number of interceptors in the chain.
positionstringSpecifies a position where to place the new interceptor. Allowed values are FIRST, LAST, and OTHER_THAN_FIRST_OR_LAST

property?

security?

Configures cache-level security.

authorization?

Configures authorization for this cache.

NameTypeDefaultDescription
enabledbooleanfalse Enables authorization checks for this cache. Defaults to true if the authorization element is present.
roles Sets the valid roles required to access this cache.
Expand/Collapse All