使用Guava Cache将数据保存到硬盘 [英] Use Guava Cache to persist data to a hard disk

查看:484
本文介绍了使用Guava Cache将数据保存到硬盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Guava Cache的新手。如何在缓存中创建以下内容?


  1. 正常将数据保存在内存中。

  2. 当缓存大小超过给定数量时,它会将缓存中的数据保存在硬盘上的可配置文件中。


扩展Guava缓存以溢出到磁盘


I am new to Guava Cache. How do I create the following in the cache?

  1. Save the data in memory as normal.
  2. When the size of the cache is over the given number, it will persist the data in cache in a configurable file on the hard disk.

解决方案

This will probably be helpful: Extending Guava caches to overflow to disk

这篇关于使用Guava Cache将数据保存到硬盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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