Manages the report data cache.

Public Methods

public canAggregateCache()

public canAggregateCache(
    ReportDimension $dimension,
    array $metrics
): bool 

Determines where cache aggregation can be used for the given dimension and metrics.

public generateRanges()

public generateRanges(
    Carbon $dateStart,
    Carbon $dateEnd,
    array $existingDates
): CarbonPeriod[] 

Generates a sequence of date ranges to comprehensively cover the provided date span. Takes into account existing dates within the range, excluding them and generating sub-ranges accordingly.

public makeCacheKey()

public makeCacheKey(
    string $dataSourceClassName,
    ReportDimension $dimension,
    array $metrics,
    array $dimensionFilters
): string 

Creates a cache key for the given dimension, metrics and dimension filters.