We have requirement to parse XML to java object and store java objects into cache. We are using ehcache for caching java objects.
Is there any way to invalidate or remove ehcache when XML file change?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
however, you can easily invalidate the cache.
Obtain a handle to the instance of the cache via CacheManager, etc and call:
cache.removeAll();
Or if you need to remove some objects you can, of course, remove individual elements.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We have requirement to parse XML to java object and store java objects into cache. We are using ehcache for caching java objects.
Is there any way to invalidate or remove ehcache when XML file change?
The forum has moved to http://forums.terracotta.org/forums/forums/list.page
however, you can easily invalidate the cache.
Obtain a handle to the instance of the cache via CacheManager, etc and call:
cache.removeAll();
Or if you need to remove some objects you can, of course, remove individual elements.