def _parse_key(key, profile):
    '''
    Parse out a key and update the opts with any override data
    '''
    comps = key.split('?')
    if len(comps) > 1:
        for item in comps[1].split('&'):
            newkey, newval = item.split('=')
            profile[newkey] = newval
    if 'cachedir' in profile:
        __opts__['cachedir'] = profile['cachedir']
    return comps[0], profile