Exemplo n.º 1
0
 def delete(self, key, **kwargs):
     response = self[key]
     try:
         del self[key]
     except:
         pass
     return dispatch(response, **kwargs)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def wrapper(self, *args, **kwargs):
     _is_read_only(self)
     return dispatch(method(self, *args, **kwargs), **kwargs)
Exemplo n.º 4
0
 def append(self, key, value, **kwargs):
     self[key] = value
     return dispatch(self[key], **kwargs)
Exemplo n.º 5
0
 def get(self, key, **kwargs):
     response = super(ObjectStorage, self).get(key, None)
     return dispatch(response, **kwargs)