public static GoalCache findGoalCache(ControlFrame frame) {
    { Proposition goal = frame.proposition;
      KeyValueList table = Proposition.findGoalCacheTable(goal);
      GoalCache goalcache = null;

      if (table == null) {
        return (null);
      }
      goalcache = Logic.lookupGoalCache(table);
      if ((goalcache != null) &&
          (goalcache.timestamp < Logic.getNowTimestamp())) {
        goalcache.cachedBindings.clear();
        goalcache.timestamp = Logic.getNowTimestamp();
      }
      return (goalcache);
    }
  }