def _delete(self): tdb.del_rel(self._type_id, self._id) #clear cache prefix = thing_prefix(self.__class__.__name__) #TODO - there should be just one cache key for a rel? cache.delete(prefix + str(self._id)) #update fast query cache cache.set(prefix + str((self._thing1_id, self._thing2_id, self._name)), None)
def _delete(self): tdb.del_rel(self._type_id, self._id) # clear cache prefix = thing_prefix(self.__class__.__name__) # TODO - there should be just one cache key for a rel? cache.delete(prefix + str(self._id)) # update fast query cache cache.set(prefix + str((self._thing1_id, self._thing2_id, self._name)), None) # temporarily set this property so the rest of this request # know it's deleted. save -> unsave, hide -> unhide self._name = "un" + self._name
def _delete(self): tdb.del_rel(self._type_id, self._id) #clear cache prefix = thing_prefix(self.__class__.__name__) #TODO - there should be just one cache key for a rel? cache.delete(prefix + str(self._id)) #update fast query cache cache.set(prefix + str((self._thing1_id, self._thing2_id, self._name)), None) #temporarily set this property so the rest of this request #know it's deleted. save -> unsave, hide -> unhide self._name = 'un' + self._name