Hi, can you please help me to understand if and how GoodData caches reports and dashboards? Is there a way how I can fine tune the caching parameters like frequency, cache invalidation and so on?
Best answer by Jakub
The GoodData Platform employs multiple types of caching and it is all part of our analytical product.
You can find “multi-level caching” mentioned in our documentation. It ensures that response times are minimized as much as possible, and the logical data model provides an abstraction layer that ensures database independence.
Here is an extract from XAE engine documentation:
“The Extensible Analytics Engine performs a number of query optimizations for processing and execution. Based on a series of mathematical operations, individual queries are partitioned horizontally by project and broken down into smaller, more efficient queries, the results of which are cached for future use. XAE inspects each calculation for sub-queries existing in caches across the entire multi-tenant platform, optimizing for performance and freshness of results.”
Now simply said thanks to the above the projects can run faster. A report called from cache is much faster than an un-cached report. You can test that when running a new report first time takes longer in comparison to the next attempt.
The cache is limited by certain threshold and when not used it is invalidated. It is also affected by data loads (for example a /etl/pull2 resource or a GD_dataset_writer in CloudConnect).
After an ETL process completes, project cache gets again invalidated, and the reports needs to be re-computed to "warm up" multi-level project cache.
Just to cover also a bit more on caching topic I can mention also the GoodData.UI. Our Library for building analytical applications contains the Visualization component. It uses cache for getting some static information from the GoodData platform to minimize the number of redundant requests. User can clear the cache from time to time (for example, after logging out, or when leaving a page with visualizations using the GoodData.UI components) by calling
clearSdkCache from the sdkCache module.
I hope my answer provided some insight on the topic.