<分区>
我正在使用 Redis 来存储请求高的信息,但我想将请求较少的内容存储在磁盘上的列表/集中。我一直在环顾四周,没有运气。 Memcached、Riak 等似乎没有列表/设置数据类型。是否有具有这些功能的数据库?
谢谢。
<分区>
我正在使用 Redis 来存储请求高的信息,但我想将请求较少的内容存储在磁盘上的列表/集中。我一直在环顾四周,没有运气。 Memcached、Riak 等似乎没有列表/设置数据类型。是否有具有这些功能的数据库?
谢谢。
最佳答案
运行另一个 Redis 实例并将其配置为开启 AOF。仅追加文件。
您可以在这里阅读更多相关信息:
http://redis.io/topics/persistence
向下滚动一半,上面有很多有用的信息。
Append-only file Snapshotting is not very durable. If your computer running Redis stops, your power line fails, or you accidentally kill -9 your instance, the latest data written on Redis will get lost. While this may not be a big deal for some applications, there are use cases for full durability, and in these cases Redis was not a viable option. The append-only file is an alternative, fully-durable strategy for Redis. It became available in version 1.1. You can turn on the AOF in your configuration file: appendonly yes From now on, every time Redis receives a command that changes the dataset (e.g. SET) it will append it to the AOF. When you restart Redis it will re-play the AOF to rebuild the state.
关于database - 寻找不在内存中且具有 "list,set"数据类型的键值数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14716197/