我在Liferay环境6.x中使用Spring portlet ehcache
如果我将portlet war放到部署文件夹中,那么在dev环境中就会出现问题。在3-4次尝试后,它会给我perm gen/ out of memory异常。
如果我的portlet正在重新部署或取消部署,是否可以删除缓存,我知道可以通过调用getCacheManager().remove("cacheKey");
来删除缓存,但是当我应该调用这个方法时,您知道如何将其与portlet实例挂钩吗?
提前谢谢。
发布于 2013-06-07 02:02:24
找到解决方案
@PreDestroy
public void cleanup() {
getCacheManager().removeCache(KEY_SERVICE_CACHE);
getCacheManager().removeCache(KEY_SOURCE_CACHE);
}
https://stackoverflow.com/questions/16967334
复制相似问题