mirror of
https://github.com/redis/go-redis.git
synced 2025-06-12 14:21:52 +03:00
Remove PSetEx and SetEx. Set should be used instead.
This commit is contained in:
12
commands.go
12
commands.go
@ -470,12 +470,6 @@ func (c *commandable) MSetNX(pairs ...string) *BoolCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *commandable) PSetEx(key string, expiration time.Duration, value string) *StatusCmd {
|
||||
cmd := NewStatusCmd("PSETEX", key, formatMs(expiration), value)
|
||||
c.Process(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *commandable) Set(key, value string, expiration time.Duration) *StatusCmd {
|
||||
args := []string{"SET", key, value}
|
||||
if expiration > 0 {
|
||||
@ -501,12 +495,6 @@ func (c *commandable) SetBit(key string, offset int64, value int) *IntCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *commandable) SetEx(key string, expiration time.Duration, value string) *StatusCmd {
|
||||
cmd := NewStatusCmd("SETEX", key, formatSec(expiration), value)
|
||||
c.Process(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *commandable) SetNX(key, value string, expiration time.Duration) *BoolCmd {
|
||||
var cmd *BoolCmd
|
||||
if expiration == 0 {
|
||||
|
Reference in New Issue
Block a user