'Determines if a given resource update is safe to ignore.
It can be safe to ignore if it has already been deleted or if
we have a copy with a higher revision number.'

def _is_stale(self, rtype, resource):

    if (resource.id in self._deleted_ids_by_type[rtype]):
        return True
    existing = self._type_cache(rtype).get(resource.id)
    if (existing and (existing.revision_number > resource.revision_number)):
        return True
    return False
