def clear_file_cache(filename=None):
    """Clear the file cache. If no filename is given clear it entirely.
    if a filename is given, clear just that filename."""
    global file_cache, file2file_remap, file2file_remap_lines
    if filename is not None:
        if filename in file_cache:
            del file_cache[filename]
            pass
    else:
        file_cache = {}
        file2file_remap = {}
        file2file_remap_lines = {}
        pass
    return