def METHOD_NAME(obj):
    if hasattr(obj, self._cache_name):
        return getattr(obj, self._cache_name)
    # Generate the value to cache.
    value = fget(obj)
    setattr(obj, self._cache_name, value)
    return value