mirror of https://github.com/go-redis/redis.git
ObjectIdleTime accepts one key.
This commit is contained in:
parent
8829ddcd8b
commit
3fa2fb8dc0
12
commands.go
12
commands.go
|
@ -57,7 +57,7 @@ type Cmdable interface {
|
||||||
Move(key string, db int64) *BoolCmd
|
Move(key string, db int64) *BoolCmd
|
||||||
ObjectRefCount(keys ...string) *IntCmd
|
ObjectRefCount(keys ...string) *IntCmd
|
||||||
ObjectEncoding(keys ...string) *StringCmd
|
ObjectEncoding(keys ...string) *StringCmd
|
||||||
ObjectIdleTime(keys ...string) *DurationCmd
|
ObjectIdleTime(key string) *DurationCmd
|
||||||
Persist(key string) *BoolCmd
|
Persist(key string) *BoolCmd
|
||||||
PExpire(key string, expiration time.Duration) *BoolCmd
|
PExpire(key string, expiration time.Duration) *BoolCmd
|
||||||
PExpireAt(key string, tm time.Time) *BoolCmd
|
PExpireAt(key string, tm time.Time) *BoolCmd
|
||||||
|
@ -378,14 +378,8 @@ func (c *cmdable) ObjectEncoding(keys ...string) *StringCmd {
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cmdable) ObjectIdleTime(keys ...string) *DurationCmd {
|
func (c *cmdable) ObjectIdleTime(key string) *DurationCmd {
|
||||||
args := make([]interface{}, 2+len(keys))
|
cmd := NewDurationCmd(time.Second, "object", "idletime", key)
|
||||||
args[0] = "object"
|
|
||||||
args[1] = "idletime"
|
|
||||||
for i, key := range keys {
|
|
||||||
args[2+i] = key
|
|
||||||
}
|
|
||||||
cmd := NewDurationCmd(time.Second, args...)
|
|
||||||
c.process(cmd)
|
c.process(cmd)
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue