def METHOD_NAME(cachedir):
    """
    Test the arguments to limit what is cleared
    """
    # Mixture of VCS backends specified with and without "fs" at the end,
    # to confirm that the correct dirs are cleared.
    backends = ["gitfs", "hg", "svnfs"]
    opts = {
        "fileserver_backend": backends,
        "cachedir": str(cachedir),
    }
    mock_fs = DummyFS(backends)
    _make_file_lists_cache(cachedir, backends + ["roots"])
    with patch.dict(fileserver.__opts__, opts), patch.object(
        salt.loader, "fileserver", MagicMock(return_value=mock_fs)
    ):
        cleared = fileserver.clear_file_list_cache(saltenv="base", backend="gitfs")
    expected = {"gitfs": ["base"]}
    assert cleared == expected, cleared
    # Trust, but verify! Check that the correct files are actually gone
    assert not (cachedir / "file_lists" / "gitfs" / "base.p").exists()
    # These files *should* exist and shouldn't have been cleaned
    assert (cachedir / "file_lists" / "gitfs" / "dev.p").exists()
    assert (cachedir / "file_lists" / "gitfs" / "foo.txt").exists()
    assert (cachedir / "file_lists" / "hg" / "base.p").exists()
    assert (cachedir / "file_lists" / "hg" / "dev.p").exists()
    assert (cachedir / "file_lists" / "hg" / "foo.txt").exists()
    assert (cachedir / "file_lists" / "svnfs" / "base.p").exists()
    assert (cachedir / "file_lists" / "svnfs" / "dev.p").exists()
    assert (cachedir / "file_lists" / "svnfs" / "foo.txt").exists()
    assert (cachedir / "file_lists" / "roots" / "base.p").exists()
    assert (cachedir / "file_lists" / "roots" / "dev.p").exists()
    assert (cachedir / "file_lists" / "roots" / "foo.txt").exists()