diff sat/memory/persistent.py @ 2734:9702025f6dff

core (memory/persistent): new LazyPersistentBinaryDict.remove method
author Goffi <goffi@goffi.org>
date Wed, 02 Jan 2019 18:24:14 +0100
parents e107089d6640
children 378188abe941
line wrap: on
line diff
--- a/sat/memory/persistent.py	Wed Jan 02 18:22:30 2019 +0100
+++ b/sat/memory/persistent.py	Wed Jan 02 18:24:14 2019 +0100
@@ -241,3 +241,11 @@
         @return: deferred fired when data is actually saved
         """
         return self.storage.setPrivateValue(self.namespace, name, value, self.binary, self.profile)
+
+    def remove(self, key):
+        """Delete a key from sotrage, and return a deferred called when it's done
+
+        @param key(unicode): key to delete
+        @return (D): A deferred fired when delete is done
+        """
+        return self.storage.delPrivateValue(self.namespace, key, self.binary, self.profile)