mirror of https://github.com/go-redis/redis.git
Merge pull request #130 from go-redis/fix/restore-time-duration
Use time.Duration in Restore.
This commit is contained in:
commit
4275a19033
|
@ -238,11 +238,11 @@ func (c *commandable) RenameNX(key, newkey string) *BoolCmd {
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *commandable) Restore(key string, ttl int64, value string) *StatusCmd {
|
func (c *commandable) Restore(key string, ttl time.Duration, value string) *StatusCmd {
|
||||||
cmd := NewStatusCmd(
|
cmd := NewStatusCmd(
|
||||||
"RESTORE",
|
"RESTORE",
|
||||||
key,
|
key,
|
||||||
formatInt(ttl),
|
formatMs(ttl),
|
||||||
value,
|
value,
|
||||||
)
|
)
|
||||||
c.Process(cmd)
|
c.Process(cmd)
|
||||||
|
|
Loading…
Reference in New Issue