Viraj
Viraj

Reputation: 5381

How to change Infinispan cache settings after it is created?

In my application i'm using Infinispan 5.3 version and I want to change setting after cache is initialized. Default settings will be loaded from xml file and some of the settings ( ex : eviction maxEntries, lifespan, etc ) should be able to change any time of application running (This is changed by sysadmin). Is there way to changed settings of already created cache ?

I tried EmbeddedCacheManager.defineConfiguration(String cacheName, Configuration configurationOverride); but this has no effect on already created cache.

Upvotes: 1

Views: 321

Answers (1)

tsykora
tsykora

Reputation: 733

Please, take into account that in the Infinispan version 5.3 there is no possibility to change cache configuration "on the fly". You need to restart your service with new configuration in case of any wanted change.

This is something the community might want to work on in the future. However, such a task is not easy because you need to figure out how to correctly deal with affected data immediately after the configuration change.

Feel free to raise new feature request: https://issues.jboss.org/browse/ISPN/

Upvotes: 3

Related Questions