def check_cache(rjc_api_client, job_spec_copy, step, workflow_workspace):
    """Check if job exists in cache."""
    http_response = rjc_api_client.check_if_cached(
        job_spec_copy, step, workflow_workspace
    )
    result = http_response.json()
    if result["cached"]:
        return result
    return {}