#900秒至少有一个key发生变化,保存一个快照
save 900 1
#每300秒至少有10个可以发生变化,持久化到文件一次
save 300 10
#60秒至少有10000个key发生变化,持久话一次
save 60 10000
# 文件保存路径
# The filename where to dump the DB
dbfilename dump.rdb
# AOF and RDB persistence can be enabled at the same time without problems.
# If the AOF is enabled on startup Redis will load the AOF, that is the file
# with the better durability guarantees.
#
# Please check http://redis.io/topics/persistence for more information.
#开启aof模式
appendonly yes
# The name of the append only file (default: "appendonly.aof")
# 文件名
appendfilename "appendonly.aof"
# More details please check the following article:
# http://antirez.com/post/redis-persistence-demystified.html
#
# If unsure, use "everysec".
#每个操作都同步
appendfsync always
#每妙同步
#appendfsync everysec
#不同步
# appendfsync no