I have a function that updates data in a cache (implemented as a dictionary).
def updateCache(name, new_data):
    global cache
    info = cache[name]  # is this being passed to me as a val or ref?
    datarows = info['datarows']
    datarows.append(new_data)
    # These will not be necessary if I was dealing with references ...?
    # or in other words, are the following statements redundant or required?
    info['datarows'] = datarows
    cache[name] = info
As the comment in the snippet enquires, do I need to stick the new updated objects back into the cache, or am I dealing with references to the objects stored in the dict - in which case the last two statements are redundant?
 
     
     
     
     
     
     
    