'Return the cache mode for the specified attribute.
If the attribute is not defined in the schema, the default cache
mode (CACHE_LOCAL) is returned.'

def get_cache_mode(self, attribute_name):

    try:
        return self._attributes[attribute_name].schema.cache_mode
    except KeyError:
        return Schema.CACHE_LOCAL
