print "cache_put correctly accepted duplicate metadata entry" print "Metadata: ", m except Exception, e: print "Fault: valid cache_put caused exception: %s" % str(e) md.add_new_details("later", None, "bollix.tcd.ie", None) try: m, f, n, i = cache_inst.cache_put(ni_name, md, None) print "cache_put: updated metadata successfully installed in cache" print "New: %s; Ignored: %s" % (n, i) print "Metadata: ", m except Exception, e: print "Fault: valid cache_put caused exception: %s" % str(e) try: md.set_size(len(ts)) md.set_ctype("text/plain") m, f, n, i = cache_inst.cache_put(ni_name, md, tfn1) print "cache_put: added content file successfully installed in cache" print "Metadata: ", m print "Content file: ", f print "New: ", n, "Ignored: ", i except Exception, e: print "Fault: valid cache_put caused exception: %s" % str(e) try: m, f, n, i = cache_inst.cache_put(ni_name, md, tfn2) print "cache_put: duplicate content file successfully ignored by cache" print "Metadata: ", m print "Content file: ", f print "New: ", n, "Ignored: ", i except Exception, e: print "Fault: valid cache_update caused exception: %s" % str(e)