summaryrefslogtreecommitdiff
path: root/plugins/kv/drivers/memcached/driver.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-24 15:31:15 +0300
committerValery Piashchynski <[email protected]>2021-06-24 15:31:15 +0300
commitfdff0ffe41b45d0e919eccc683104987898a4faf (patch)
tree79b242b1af7d283eedfb0ac124e48c5fa47ef461 /plugins/kv/drivers/memcached/driver.go
parentce53a8e149b76f15e8a5dd88ac3b953798d57e8b (diff)
- Add Clear method to the storages
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/kv/drivers/memcached/driver.go')
-rw-r--r--plugins/kv/drivers/memcached/driver.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/kv/drivers/memcached/driver.go b/plugins/kv/drivers/memcached/driver.go
index a2787d72..14e7c078 100644
--- a/plugins/kv/drivers/memcached/driver.go
+++ b/plugins/kv/drivers/memcached/driver.go
@@ -237,3 +237,13 @@ func (d *Driver) Delete(keys ...string) error {
}
return nil
}
+
+func (d *Driver) Clear() error {
+ err := d.client.DeleteAll()
+ if err != nil {
+ d.log.Error("flush_all operation failed", "error", err)
+ return err
+ }
+
+ return nil
+}