docs: private static int computeMaxAge(final HttpQuery query,
                                     final long start_time, final long end_time,
                                     final long now) {
      // If the end time is in the future (1), make the graph uncacheable.
      // Otherwise, if the end time is far enough in the past (2) such that
      // no TSD can still be writing to rows for that time span and it's not
      // specified in a relative fashion (3) (e.g. "1d-ago"), make the graph
      // cacheable for a day since it's very unlikely that any data will change
      // for this time span.
      // Otherwise (4), allow the client to cache the graph for ~0.1% of the
      // time span covered by the request e.g., for 1h of data, it's OK to
      // serve something 3s stale, for 1d of data, 84s stale.
      if (end_time > now) {                            // (1)
        return 0;
      } else if (end_time < now - Const.MAX_TIMESPAN   // (2)
                 && !DateTime.isRelativeDate(
                     query.getQueryStringParam("start"))    // (3)
                 && !DateTime.isRelativeDate(
                     query.getQueryStringParam("end"))) {
        return 86400;
      } else {                                         // (4)
        return (int) (end_time - start_time) >> 10;
      }
    }