public List<StatData> getData(String startTime, String endTime, String inlongGroupId,
            String inlongStreamId, String auditId, String auditTag, boolean needRetry) {
        List<StatData> result = new ArrayList<>();
        List<CacheKeyEntity> keyList = buildCacheKeyList(startTime, endTime, inlongGroupId,
                inlongStreamId, auditId, auditTag);

        for (CacheKeyEntity cacheKey : keyList) {
            StatData statData = fetchStatDataFromCache(cacheKey);
            if (statData == null && needRetry) {
                long statTimeMillis = System.currentTimeMillis();
                statData = fetchDataFromAuditStorage(cacheKey.getStartTime(), cacheKey.getEndTime(), inlongGroupId,
                        inlongStreamId, auditId, auditTag);
                MetricsManager.getInstance().addApiMetricNoCache(auditCycle,
                        System.currentTimeMillis() - statTimeMillis);
            }
            if (statData != null) {
                result.add(statData);
            }
        }
        return result;
    }
@param startTime
@param endTime
@param inlongGroupId
@param inlongStreamId
@param auditId
@param auditTag
@return
inlong-audit/audit-service/src/main/java/org/apache/inlong/audit/service/cache/AbstractCache.java