代潇瑞博客

restore 命令/方法/函数

Description

Restore a key from the result of a DUMP operation.

恢复DUMP函数销毁的VALUE到一个新的KEY上。


Parameters

key string. The key name

ttl integer. How long the key should live (if zero, no expire will be set on the key)

value string (binary). The Redis encoded key value (from DUMP)


Examples

$redis->set('foo', 'bar');

$val = $redis->dump('foo');

$redis->restore('bar', 0, $val); // The key 'bar', will now be equal to the key 'foo'

【相关命令】

触屏版 | 电脑版

Copyright © 2013 代潇瑞博客手机版

QQ: 446673330

粤ICP备13071969号-1