1 of 1 people found this helpful
Does the entire infinispan contents need to be stored in memory or is it possible to page less frequently used data to disk ?
yes it can store the data in a CacheLoader, there are several implementations available: to write on a filesystem, in a database, to a cloud storage provider, and others.
If this is not possible, is it possible to set a fixed size to the cache and the oldest data be purged when the limit is reached ?
yes, you can configure any eviction strategy and enable passivation. Passivation makes sure that evicted data is stored in the CacheLoader instead of deleting it.
Alternatively to passivation, you can use the CacheLoader in other ways, such as write-throuh or write-behind.
So to clarify, I need to enable a CacheLoader, as per normal when you want to keep the data longer than the lifetime of the JVM. I then need to select an eviction policy and pasivation
Any chance of any code snippets or urls to guide that show something similar in action ?
This is the best source we have so far: https://docs.jboss.org/author/display/ISPN/CacheLoaders
Select your cache store and enable passivation. Other than that, eviction can be configured as per https://docs.jboss.org/author/display/ISPN/Eviction+Examples with more information in https://docs.jboss.org/author/display/ISPN/Eviction