def cached_property(method):
    def find_cached(self):
        try:
            return self.cached_properties[method.__name__]
        except __HOLE__:
            self.cached_properties[method.__name__] = method(self)
            self.save()
            return self.cached_properties[method.__name__]
    return find_cached
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/domain/models.py/cached_property