Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
当然,尝试一下 Terracotta 或 EhCache。或者 Google 搜索“java 缓存”并选择其他内容。
Sure, try Terracotta or EhCache. Or Google for "java cache" and pick something else.
操作系统会自动缓存文件。它还会自动将最近使用的文件部分保留在内存中(它可以部分缓存文件)。我建议您让操作系统为您进行缓存,并找到一种在 Java 和操作系统之间高效获取数据的方法。
The OS caches files automatically. It will also automatically keep in the memory the most recently used portions of files (it can partially cache a file) I suggest you let the OS do the caching for you and find a way to efficient get data between Java and the OS.
Java 中的开源缓存解决方案
Open Source Cache Solutions in Java
我在 ehcache 方面运气很好。它是非常可配置的。
I have had good luck with ehcache. It is very configurable.