public static boolean applyCachedAsk(Cons inputvariables, Cons querybody, Cons inputbindings, Stella_Object options, Symbol cacheid, Object [] MV_returnarray) {
    { QueryIterator queryiterator = Logic.makeCachedQuery(inputvariables, querybody, inputbindings, options, cacheid);

      if (queryiterator != null) {
        { TruthValue truthvalue = Logic.callAsk(queryiterator);

          QueryIterator.freeCachedQuery(queryiterator, cacheid);
          { boolean _return_temp = (truthvalue == Logic.TRUE_TRUTH_VALUE) ||
                (truthvalue == Logic.DEFAULT_TRUE_TRUTH_VALUE);

            MV_returnarray[0] = truthvalue;
            return (_return_temp);
          }
        }
      }
      else {
        { boolean _return_temp = false;

          MV_returnarray[0] = null;
          return (_return_temp);
        }
      }
    }
  }