I am using Ehcache in Hibernate.
How can I notify the cache that the database has changed? How can I invalidate the cached data? How can I programmatically achieve t
In case if you want to remove a specific cache (eg:employeeCache)
@Autowired CacheManager cacheManager;
place where you want to invalidate cache, use below code
Cache cache = cacheManager.getCache("employeeCache"); cache.removeAll();