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:
12
commands.go
12
commands.go
@ -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
|
||||
|
Reference in New Issue
Block a user