def _delete(self): tdb.del_rel(self._type_id, self._id) #clear cache self._cache.delete(self._cache_key()) #update fast query cache self._fast_cache.set(self._fast_cache_key(), 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? self._cache.delete(prefix + str(self._id)) # update fast query cache self._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) self._cache.delete(self._cache_key()) if self.__class__._enable_fast_query: ttl = self.__class__._rel_cache_ttl self._rel_cache.set(self._rel_cache_key(), None, time=ttl) # temporarily set this property so the rest of this request # knows 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? self._cache.delete(prefix + str(self._id)) #update fast query cache self._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