def pytest_report_header(config):
    """Display cachedir with --cache-show and if non-default."""
    if config.option.verbose > 0 or config.getini('cache_dir'
        ) != '.pytest_cache':
        cachedir = config.cache._cachedir
        try:
            displaypath = cachedir.relative_to(config.rootdir)
        except ValueError:
            displaypath = cachedir
        return 'cachedir: {}'.format(displaypath)
