使用咖啡因将数据缓存到本地硬盘?

发布于 2025-01-15 21:54:30 字数 397 浏览 4 评论 0原文

我正在开发一个分布式应用程序,它从全局 redis 缓存中检索数据,并使用 咖啡因。据我了解,咖啡因旨在将数据缓存在内存(RAM)而不是硬盘中。

虽然我有兴趣将一些数据存储在 RAM 中,但我希望能够选择在 HDD 中缓存更大的数据集。与通过网络从 redis 请求相同数据数千次相比,将从全局缓存存储库接收到的数据缓存到本地 HDD 仍然可以让我更快地访问数据。其想法是仅当数据发生变化或经过一定时间后才刷新本地数据(类似于 Caffeine 将数据缓存到内存的方式)。

是否可以将Caffeine缓存数据到本地磁盘?

I’m developing a distributed application that retrieves data from a global redis cache and caches the data locally using Caffeine. From my understanding Caffeine was designed to cache data in memory (RAM) and not to HDD.

While I’m interested in storing some of the data in RAM, I want the option to cache larger datasets in HDD. Caching the data received from the global cache repository to the local HDD would still allow me to access the data much faster as compared to requesting the same data thousands of times from redis over a network. The idea is to refresh the local data only when the data changes or after a certain amount of time elapses (similar to how Caffeine caches data to memory).

Is it possible to have Caffeine cache data to local disk?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文