如何在没有服务器重启的情况下清除ehcache [英] How to clear ehcache without server restart

查看:1184
本文介绍了如何在没有服务器重启的情况下清除ehcache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

虽然我猜它极不可能 - 但有没有办法在不重新启动服务器的情况下清除ehcache?
我需要清除缓存以进行一些测试 - 我无法更改代码,也无法多次重启服务器。

Though I guess its highly unlikely - but is there any way to clear the ehcache without restarting the server? I need to clear the cache for some testing - I cannot change the code and cannot afford to restart server at multiple times.

PS:我使用的是apache-tomcat-5.5.25
请告诉我。
谢谢,
psvm

PS: I am using apache-tomcat-5.5.25 Please let me know. Thanks, psvm

推荐答案

您是否通过JMX公开Ehcache?然后,您可以使用JMX操作清除缓存,例如使用jvisualvm。寻找像 net.sf.ehcache.CacheManager 这样的MBean,它提供 clearAll()操作。

Do you expose Ehcache via JMX? Then you could clear the cache using JMX operations by using a tool like e.g. jvisualvm. Look for MBeans like net.sf.ehcache.CacheManager which provide a clearAll() operation.

这篇关于如何在没有服务器重启的情况下清除ehcache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆