def delete(self, key, **kwargs): response = self[key] try: del self[key] except: pass return dispatch(response, **kwargs)
def set(self, key, value, expire=None, pexpire=None, only_if_not_exists=False, only_if_exists=False, **kwargs): response = None if (key not in self and only_if_not_exists is True) \ or (key in self and only_if_exists is True): self[key] = value self._expires[key] = expire or pexpire return dispatch(response, **kwargs)
def wrapper(self, *args, **kwargs): _is_read_only(self) return dispatch(method(self, *args, **kwargs), **kwargs)
def append(self, key, value, **kwargs): self[key] = value return dispatch(self[key], **kwargs)
def get(self, key, **kwargs): response = super(ObjectStorage, self).get(key, None) return dispatch(response, **kwargs)