from pathlib import Path


def get_ref_file() -> str:
    """Read the ref file, cached to reduce amount of times we need to read the file into memory

    Returns:
        str: ref file contents
    """
    ref_file_path = Path.cwd() / '.palm/model_template/ref_files/ref_file.sql'
    if not ref_file_path.exists():
        return ''
    contents = ref_file_path.read_text()
    return contents