anu*_*ava 4 statistics spring caching abstraction
Spring提供了Cache Abstraction的一个有用功能
但我找不到的是提供者不可知的方式来获取实时缓存统计信息.基本上我只想在网页上或通过JMX显示所有缓存名称及其对应键的列表,其中包括命中,未命中和大小(以kb为单位).我知道ehcache确实提供了这个功能,如果我在代码中使用ehcache API,我可以得到它(过去已经使用过它).但我相信在代码中使用ehcache API会剥夺Spring框架缓存抽象的整个概念.
您拥有的唯一常见的,与提供程序无关的东西是CacheManager
interface,它提供以下方法:
Collection<String> getCacheNames()
Run Code Online (Sandbox Code Playgroud)
它返回缓存管理器已知的缓存集合.
归档时间: |
|
查看次数: |
430 次 |
最近记录: |