In many cases, I want to write a report that performs multiple database setup things to enable an analysis.
Like, 9 SQL queries against a data warehouse and the final report SQL (that is returned by getSQL()) is the tenth that shows the results of the previous 9 SQL statements...
But if a report is cached, then I do not want to run those 9 statements at all..
I just want to let the engine know "the 10th statement has not changed... and I want to use the cached version of this report for today".
This way, I can have a report that does extensive SQL work inside an if statement that is basically saying... "it is time to refresh all 9 SQL queries to refresh todays version of the report" and it will return todays report instantly on the 2nd through nth time the report is loaded... and only be very slow on the first run of the report.
In many cases, I want to write a report that performs multiple database setup things to enable an analysis.
Like, 9 SQL queries against a data warehouse and the final report SQL (that is returned by getSQL()) is the tenth that shows the results of the previous 9 SQL statements...
But if a report is cached, then I do not want to run those 9 statements at all..
I just want to let the engine know "the 10th statement has not changed... and I want to use the cached version of this report for today".
This way, I can have a report that does extensive SQL work inside an if statement that is basically saying... "it is time to refresh all 9 SQL queries to refresh todays version of the report" and it will return todays report instantly on the 2nd through nth time the report is loaded... and only be very slow on the first run of the report.