def METHOD_NAME() -> Tuple['MemCache', threading.Lock]:
    # lock needed because pylibmc(memcached client) is not threadsafe
    cacheLock = threading.Lock()
    # check if credentials and location exist, otherwise assume
    # location is 127.0.0.1 (localhost) with no password
    url = config.getConfig('cache_memcached_url')
    if not url:
        url = '127.0.0.1'
    memcachedUsername = config.getConfig('cache_memcached_username')
    if not memcachedUsername:
        memcachedUsername = None
    memcachedPassword = config.getConfig('cache_memcached_password')
    if not memcachedPassword:
        memcachedPassword = None
    try:
        cache = MemCache(url, memcachedUsername, memcachedPassword,
                         mustBeAvailable=True)
    except Exception:
        config.getConfig('logger').info('Cannot use memcached for caching.')
        cache = None
    return cache, cacheLock