def add_cli_cache(main: click.Group) -> click.Group:  
@main.group()<EOL>def cache():<EOL><INDENT>"""<STR_LIT>"""<EOL><DEDENT>@cache.command()<EOL>@click.pass_obj<EOL>def locate(manager):<EOL><INDENT>"""<STR_LIT>"""<EOL>data_dir = get_data_dir(manager.module_name)<EOL>click.echo(data_dir)<EOL><DEDENT>@cache.command()<EOL>@click.pass_obj<EOL>def ls(manager):<EOL><INDENT>"""<STR_LIT>"""<EOL>data_dir = get_data_dir(manager.module_name)<EOL>for path in os.listdir(data_dir):<EOL><INDENT>click.echo(path)<EOL><DEDENT><DEDENT>@cache.command()<EOL>@click.pass_obj<EOL>def clear(manager):<EOL><INDENT>"""<STR_LIT>"""<EOL>clear_cache(manager.module_name)<EOL><DEDENT>return main<EOL>
Add several commands to main :mod:`click` function for handling the cache.