bz19507: Don't put metadata objects into the cache if the insert fails