summaryrefslogtreecommitdiff
path: root/plugins/redis
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-25 11:47:24 +0300
committerValery Piashchynski <[email protected]>2021-06-25 11:47:24 +0300
commit09041fe7499be1929aaffaa113f93f6853564c09 (patch)
treea608df4250439cf9a1511f9e00ff7af6a033579d /plugins/redis
parent64d41f6d87bb8002e700cdcddb5a3a241e4a2a7d (diff)
parente9249c7896331bab97a18a7ee0db17803fdd31fb (diff)
Merge remote-tracking branch 'origin/master' into feature/jobs_plugin
Diffstat (limited to 'plugins/redis')
-rw-r--r--plugins/redis/kv.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/redis/kv.go b/plugins/redis/kv.go
index 378d7630..5bf03af1 100644
--- a/plugins/redis/kv.go
+++ b/plugins/redis/kv.go
@@ -240,3 +240,12 @@ func (d *Driver) TTL(keys ...string) (map[string]string, error) {
}
return m, nil
}
+
+func (d *Driver) Clear() error {
+ fdb := d.universalClient.FlushDB(context.Background())
+ if fdb.Err() != nil {
+ return fdb.Err()
+ }
+
+ return nil
+}