import pathlib


def get_files_for_extension(directory: pathlib.Path, extension: str):
    """Cached file list.

    Parameters
    ----------
    directory
        The directory within which to search
    extension
        The extension to recursively search for

    """
    return [
        str(item.relative_to(directory)) for item in directory.glob(f"**/*{extension}")
    ]