def set_cache(session):
    """Set cache used by plugins."""
    if not hasattr(session, '_docstrings_cache'):
        session._docstrings_cache = {}
    if '_parsed_files' not in session._docstrings_cache:
        session._docstrings_cache['_parsed_files'] = set()
    if not hasattr(session, '_test_dirs_cache'):
        session._test_dirs_cache = set(), set()
