def get_multi_cache_prefix(cache_site, filename, logger=logging.log):
    '\n    for a givent cache site and filename, return address of the cache node that\n    should be prefixed.\n\n    :param cache_site: Cache site\n    :param filename:  Filename\n    '
    vp_endpoint = get_vp_endpoint()
    if (not vp_endpoint):
        return ''
    x_caches = REGION.get('CacheSites')
    if (x_caches is NO_VALUE):
        try:
            response = requests.get('{}/serverRanges'.format(vp_endpoint), verify=False)
            if response.ok:
                x_caches = response.json()
                REGION.set('CacheSites', x_caches)
            else:
                REGION.set('CacheSites', {'could not reload': ''})
                return ''
        except requests.exceptions.RequestException as re:
            REGION.set('CacheSites', {'could not reload': ''})
            logger(logging.WARNING, 'In get_multi_cache_prefix, could not access {}. Excaption:{}'.format(vp_endpoint, re))
            return ''
    if (cache_site not in x_caches):
        return ''
    xcache_site = x_caches[cache_site]
    h = (float(unpack('Q', sha256(filename.encode('utf-8')).digest()[:8])[0]) / (2 ** 64))
    for irange in xcache_site['ranges']:
        if (h < irange[1]):
            return xcache_site['servers'][irange[0]][0]
    return ''
for a givent cache site and filename, return address of the cache node that
should be prefixed.

:param cache_site: Cache site
:param filename:  Filename
def get_multi_cache_prefix(cache_site, filename, logger=logging.log):
    '\n    for a givent cache site and filename, return address of the cache node that\n    should be prefixed.\n\n    :param cache_site: Cache site\n    :param filename:  Filename\n    '
    vp_endpoint = get_vp_endpoint()
    if (not vp_endpoint):
        return 
    x_caches = REGION.get('CacheSites')
    if (x_caches is NO_VALUE):
        try:
            response = requests.get('{}/serverRanges'.format(vp_endpoint), verify=False)
            if response.ok:
                x_caches = response.json()
                REGION.set('CacheSites', x_caches)
            else:
                REGION.set('CacheSites', {'could not reload': })
                return 
        except requests.exceptions.RequestException as re:
            REGION.set('CacheSites', {'could not reload': })
            logger(logging.WARNING, 'In get_multi_cache_prefix, could not access {}. Excaption:{}'.format(vp_endpoint, re))
            return 
    if (cache_site not in x_caches):
        return 
    xcache_site = x_caches[cache_site]
    h = (float(unpack('Q', sha256(filename.encode('utf-8')).digest()[:8])[0]) / (2 ** 64))
    for irange in xcache_site['ranges']:
        if (h < irange[1]):
            return xcache_site['servers'][irange[0]][0]
    return 