def save_load(jid, clear_load):
    cb_ = _get_connection()

    try:
        jid_doc = cb_.get(str(jid))
    except couchbase.exceptions.NotFoundError:
        log.warning('Could not write job cache file for jid: {0}'.format(jid))
        return False

    jid_doc.value['load'] = clear_load
    cb_.replace(str(jid), jid_doc.value, cas=jid_doc.cas, ttl=_get_ttl())

    # if you have a tgt, save that for the UI etc
    if 'tgt' in clear_load:
        ckminions = salt.utils.minions.CkMinions(__opts__)
        # Retrieve the minions list
        minions = ckminions.check_minions(
            clear_load['tgt'],
            clear_load.get('tgt_type', 'glob')
            )
        save_minions(jid, minions)
Save the load to the specified jid
dataset/ETHPy150Open saltstack/salt/salt/returners/couchbase_return.py/save_load