Set common cache parameters through tool configuration files
Furthermore, thanks to the excellent feedback from the Infinispan community and in particular, Brian Stansberry, we've decided to allow users to define the most commonly tweaked Infinispan cache parameters via hibernate.cfg.xml or persistence.xml, for example eviction/expiration settings. So, with the Infinispan cache provider, you can configure eviction/expiration this way: Â Â Â LRU Â Â 2000 Â Â 5000 Â Â 60000 Â Â 30000 Â With the above configuration, you're overriding whatever eviction/expiration settings were defined for the default entity cache name in the Infinispan cache configuration used, regardless of whether it's the default one or user defined. More specifically, we're defining the following: All entities to use LRU eviction strategy The eviction thread to wake up every 2000 milliseconds The maximum number of entities for each entity type to be 5000 entries The lifespan of each entity instance to be 600000 milliseconds The maximum idle time for each entity instance to be 30000