tags:

views:

20

answers:

0

Hi,

I want to dynamically change the configuration of the EhCache instance we're using, specifically the maxElementsInMemory setting. We are using EhCache 1.5 and I can see that it is possible API-wise:

cache.getCacheConfiguration().setMaxElementsInMemory(num); 

But the documentation of EhCache says:

After a Cache has been started its configuration is not generally changeable. However, since Ehcache 2.0, certain aspects of cache configuration can modified dynamically at runtime...

So my question is: can I use this API in EhCache 1.5 or is it not guaranteed to work?

Thanks.