def store_archiver_index(config, archiver, index):
root = pathlib.Path(config.cache_path) / archiver.name<EOL>if not root.exists():<EOL><INDENT>root.mkdir()<EOL>logger.debug("<STR_LIT>")<EOL><DEDENT>index = sorted(index, key=lambda k: k["<STR_LIT:date>"], reverse=True)<EOL>filename = root / "<STR_LIT>"<EOL>with open(filename, "<STR_LIT:w>") as out:<EOL><INDENT>out.write(json.dumps(index, indent=<NUM_LIT:2>))<EOL><DEDENT>logger.debug(f"<STR_LIT>")<EOL>return filename<EOL>
Store an archiver's index record for faster search.

:param config: The configuration
:type  config: :class:`wily.config.WilyConfig`

:param archiver: The name of the archiver type (e.g. 'git')
:type  archiver: ``str``

:param index: The archiver index record
:type  index: ``dict``

:rtype: `pathlib.Path`