Mercurial > libervia-backend
changeset 442:ab9ddf6c7eaf
core: added get method to PersistentDictionary
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 03 Dec 2011 22:21:52 +0100 |
parents | a6640bb8ee95 |
children | 7099ea9c1b12 |
files | src/memory/persistent.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/memory/persistent.py Sat Dec 03 22:21:27 2011 +0100 +++ b/src/memory/persistent.py Sat Dec 03 22:21:52 2011 +0100 @@ -104,6 +104,9 @@ self.storage.delIndPrivate(self.namespace, key, self.profile) return self._cache.__delitem__(key) + def get(self, key, default=None): + return self._cache.get(key, default) + def force(self, name): """Force saving of an attribute to storage @return: deferred fired when data is actually saved"""