mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Add FlushDBAsync and FlushAllAsync
This commit is contained in:
23
commands.go
23
commands.go
@ -192,7 +192,9 @@ type Cmdable interface {
|
||||
ConfigSet(parameter, value string) *StatusCmd
|
||||
DbSize() *IntCmd
|
||||
FlushAll() *StatusCmd
|
||||
FlushDb() *StatusCmd
|
||||
FlushAllAsync() *StatusCmd
|
||||
FlushDB() *StatusCmd
|
||||
FlushDBAsync() *StatusCmd
|
||||
Info(section ...string) *StringCmd
|
||||
LastSave() *IntCmd
|
||||
Save() *StatusCmd
|
||||
@ -1685,12 +1687,31 @@ func (c *cmdable) FlushAll() *StatusCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *cmdable) FlushAllAsync() *StatusCmd {
|
||||
cmd := NewStatusCmd("flushall", "async")
|
||||
c.process(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
// Deprecated. Use FlushDB instead.
|
||||
func (c *cmdable) FlushDb() *StatusCmd {
|
||||
cmd := NewStatusCmd("flushdb")
|
||||
c.process(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *cmdable) FlushDB() *StatusCmd {
|
||||
cmd := NewStatusCmd("flushdb")
|
||||
c.process(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *cmdable) FlushDBAsync() *StatusCmd {
|
||||
cmd := NewStatusCmd("flushdb", "async")
|
||||
c.process(cmd)
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *cmdable) Info(section ...string) *StringCmd {
|
||||
args := []interface{}{"info"}
|
||||
if len(section) > 0 {
|
||||
|
Reference in New Issue
Block a user