Actually it is a little bit more complicated 😉
Report definition consists of:
1. metrics, dimensionality(attributes), filters
2. sort order, pivoting definition(if required) and paging.
In
GD.CN we cache so called raw result (not reflecting point 2.) and the final result(including point 2.).
If you request different setup of point 2., no SQL is executed against your data source, only the raw result is transformed into the final result in a different way.
Finally, we provide a, optional 3rd level level of caching.
It can be turned on during data source registration (attributes enableCaching and cachePath). When you turned it on and you issue a report, all levels of aggregation (pre-aggregations) are materialized into your data source into a schema configured in cachePath.
If you issue a report, which is similar to previously executed report (same pre-aggregations), these pre-aggregations are reused.
All levels of caches can be invalidated by calling the uploadNotification API mentioned by
@Michal Hauzírek. Best practice is to call it as a part of your ETL process changing the tables, which are mapped into
GD.CN.