public boolean isResultRequired(ResultProducer rp, Object[] key)
    throws Exception {
    
    if (m_ResultProducer != rp) {
      throw new Error("Unrecognized ResultProducer calling isResultRequired!");
    }
    if (m_Debug) {
      System.err.print("Is result required...");
      for (int i = 0; i < key.length; i++) {
	System.err.print(" " + key[i]);
      }
      System.err.flush();
    }
    boolean retval = false;

    // Check the key cache first
    if (!m_CacheKeyName.equals("")) {
      if (!isCacheValid(key)) {
	loadCache(rp, key);
      }
      retval = !isKeyInCache(rp, key);
    } else {
      // Ask whether the results are needed
      retval = !isKeyInTable(m_ResultsTableName,
					     rp, key);
    }
    
    if (m_Debug) {
      System.err.println(" ..." + (retval ? "required" : "not required")
			 + (m_CacheKeyName.equals("") ? "" : " (cache)"));
      System.err.flush();
    }
    return retval;
  }