'Read the current value of thing from cache and update self.
To be used before writing cache to avoid clobbering changes made by a
different process. Must be called under write lock.'

def update_from_cache(self, lock):

    assert lock.have_lock
    other_selfs = self.__class__.get_things_from_cache([self._id], allow_local=False)
    if (not other_selfs):
        return
    other_self = other_selfs[self._id]
    for base_prop in self._base_props:
        other_self_val = getattr(other_self, base_prop)
        self.__setattr__(base_prop, other_self_val, make_dirty=False)
    self._t = other_self._t
    self_changes = self._dirties
    self._dirties = {}
    for (data_prop, (old_val, new_val)) in self_changes.iteritems():
        setattr(self, data_prop, new_val)
