def METHOD_NAME(relative_to_fname, uri, cache):
    error = None
    content = None
    if uri.startswith('/'):
        path = ROOT_FOLDER + uri
    else:
        path = os.path.join(os.path.dirname(relative_to_fname), uri)
    path = os.path.normpath(path)
    if path in cache:
        error, content = cache[path]
    else:
        if not os.path.exists(path):
            error = "does not exist"
        else:
            if os.path.isdir(path):
                error = "should link to README.md rather than folder"
            elif path.endswith('.md'):
                with open(path, 'rt', encoding='utf-8') as f:
                    content = f.read()
        cache[path] = (error, content)
    return error, content, path