code: func (c *CasIdx) updateCassandra(now uint32, inMemory bool, archive idx.Archive, partition int32) idx.Archive {
  	// if the entry has not been saved for 1.5x updateInterval
  	// then perform a blocking save.
  	if archive.LastSave < (now - c.updateInterval32 - c.updateInterval32/2) {
  		log.Debugf("cassandra-idx: updating def %s in index.", archive.MetricDefinition.Id)
  		c.writeQueue <- writeReq{recvTime: time.Now(), def: &archive.MetricDefinition}
  		archive.LastSave = now
  		c.MemoryIndex.UpdateArchive(archive)
  	} else {
  		// perform a non-blocking write to the writeQueue. If the queue is full, then
  		// this will fail and we won't update the LastSave timestamp. The next time
  		// the metric is seen, the previous lastSave timestamp will still be in place and so
  		// we will try and save again.  This will continue until we are successful or the
  		// lastSave timestamp become more then 1.5 x UpdateInterval, in which case we will
  		// do a blocking write to the queue.
  		select {
  		case c.writeQueue <- writeReq{recvTime: time.Now(), def: &archive.MetricDefinition}:
  			archive.LastSave = now
  			c.MemoryIndex.UpdateArchive(archive)
  		default:
  			statSaveSkipped.Inc()
  			log.Debugf("cassandra-idx: writeQueue is full, update of %s not saved this time.", archive.MetricDefinition.Id)
  		}
  	}
  
  	return archive
  }
docs: // updateCassandra saves the archive to cassandra and
  // updates the memory index with the updated fields.