1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-14 01:21:30 +03:00

Add RestoreReplace.

This commit is contained in:
Vladimir Mihailenco
2015-07-11 12:23:04 +03:00
parent 39c9dc2665
commit 412baf447b
2 changed files with 45 additions and 14 deletions

View File

@ -249,6 +249,18 @@ func (c *commandable) Restore(key string, ttl int64, value string) *StatusCmd {
return cmd
}
func (c *commandable) RestoreReplace(key string, ttl time.Duration, value string) *StatusCmd {
cmd := NewStatusCmd(
"RESTORE",
key,
formatMs(ttl),
value,
"REPLACE",
)
c.Process(cmd)
return cmd
}
type Sort struct {
By string
Offset, Count float64