def METHOD_NAME(block_cache, block_data):
    """ Compare block_cache object with data and update if there are differences. """
    paths = _paths_from_data(block_data['paths'])
    if block_cache.display_name != block_data['display_name'] or not paths_equal(block_cache.paths, paths):
        log.info('Updating XBlockCache with usage_key: %s', str(block_cache.usage_key))
        block_cache.display_name = block_data['display_name']
        block_cache.paths = paths
        block_cache.save()