Skip to main content
atoti.AggregateCache(
    *,
    capacity: int,
    measures: Set[HasIdentifier[MeasureIdentifier] | MeasureIdentifier] | None = None,
)
Aggregate cache of a Cube.
There is a default cache:
Increasing the capacity and only caching contributors.COUNT aggregates:
Changing back to caching all the measures:
Disabling caching but keeping sharing enabled:
Disabling caching and sharing:

Attributes

capacity

The capacity of the cache.
  • If greater than 0, this value corresponds to the maximum amount of {location: measure} pairs that the cache can hold.
  • If 0, caching is disabled but sharing stays enabled: concurrent queries will share their computed aggregates, but the aggregates will not be stored to be reused in later queries.

measures

The measures to cache. This should typically be the measures that are known to be the most expensive to compute. If None, all measures will be cached.