Menu

Invalidate ehcache on XML file change

Developers
Anonymous
2012-08-23
2013-05-14
  • Anonymous

    Anonymous - 2012-08-23

    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?

     
  • Andrew Liles

    Andrew Liles - 2012-08-24

    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.

     

Log in to post a comment.