private ArrayDeviceTimeIndex getDeviceTimeIndexFromCache(
      @Nullable CompactionScheduleContext context, TsFileResource resource) throws IOException {
    if (deviceTimeIndexCache.containsKey(resource)) {
      return deviceTimeIndexCache.get(resource);
    }
    if (context != null) {
      ArrayDeviceTimeIndex timeIndex = context.getResourceDeviceInfo(resource);
      if (timeIndex != null) {
        deviceTimeIndexCache.put(resource, timeIndex);
        return timeIndex;
      }
    }
    ITimeIndex timeIndex = resource.getTimeIndex();
    if (timeIndex instanceof FileTimeIndex) {
      timeIndex = CompactionUtils.buildDeviceTimeIndex(resource);
    }
    deviceTimeIndexCache.put(resource, (ArrayDeviceTimeIndex) timeIndex);
    return (ArrayDeviceTimeIndex) timeIndex;
  }
The size of global compaction estimation rough file info cahce.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/AbstractCompactionEstimator.java