save 命令/方法/函数

Performs a synchronous save.

同步执行写入到磁盘。即手动触发将内存中的数据持久化到磁盘中,通常用于RDB持久化的模式下。(跟bgsave类似,不同的是,bgsave会单独起一个进程进行备份持久化。详细请参考:https://www.daixiaorui.com/read/230.html


Parameters

None.


Return value

BOOL: TRUE in case of success, FALSE in case of failure. If a save is already running, this command will fail and return FALSE.


Example

$redis->save();