'Loads an asset based on its location, either retrieving it from a cache
or loading it directly from the contentstore.'

def load_asset_from_location(self, location):

    content = get_cached_content(location)
    if (content is None):
        try:
            content = AssetManager.find(location, as_stream=True)
        except (ItemNotFoundError, NotFoundError):
            raise
        if ((content.length is not None) and (content.length < 1048576)):
            content = content.copy_to_in_mem()
            set_cached_content(content)
    return content
