I’ve read that report results are cached for 24h, but I have updated the CDM and I want to see updated reports. Is there an Atlas (or webapi) command that I can use to force update the reports?
Did you ever figure out how to do this? I’m facing a similar issue.
If you are updating the underlying report data (like you re-ran Achilles with new CDM data), your WebAPI may have already cached results. So, to clear this cache, you need to delete records from the WebAPI database. The two tables are:
achilles_cache: this stores the Data Sources reports (like Condition Occurence reports).
cdm_cache: this stores the record counts that are displayed when you search the vocabulary or look at the ‘included concepts’ of a concept set. Those columns are RC/DRC and PC/PRC (record count, descendant record count, and person count, descendent person count).
We don’t have a button in the Atlas UI that can clear this cache. So, you should run a TRUNCATE on those two tables in your WebAPI database if you want the new results to be fetched from the results schema on your SOURCE.
Chris - thanks for the advice.
I have cleared both of these tables in the webapi schema on Postgres and the stale data is still being reported. I can see that the job to warm the cache completes and I can inspect the contents of both cache tables and see that new records are in the table. I also have checked the various achiles tables in my source database and can see that records are there. Finally, I’ve tried restarting the various servers and also using new web browsers all to no effect.
I’m struggling to understand how all the different components fit together and how to operationalize the software. My understanding of the general steps are:
- Load incremental data into the CDM on a weekly basis
- Run the Achilles R scripts after the data load completes
- Clear the Webapi cache tables in Postgres
- Restart the Broadsea containers
Is that generally correct?
Yes, those steps should definitely cover it. IT’s strange if you clear the tables and they get populated with content that you’re still seeing wrong data (what is the data that’s filling up the tables after you cleared them?)
Is it possible that you have a different schema set up with your incremental refresh or that there is some confusion between the connection information in your SOURCE table?
I have best success with restarting the tomcat with webapi. Refreshing sources on webapi also helps for other config-related issues
@Chris_Knoll we are looking on our webapi schema and these tables are empty, but we still get cached results, there is any other place to check this? we are using WebAPI 2.11
Apologies, my information above was related to 2.13.
Let me ask one of the devs from Odysseus to chime in on the caching implementation in 2.11 and how it might be cleared.
Hi @Chris_Knoll, how do I fetch those results? I truncated the data I had in the achilles_cache and ran achilles function to generate the results which worked fine, but the cache is empty.
I also started the webapi again, as refresh the source and restarted tomcat, still no reports at all now.
optimizeAtlasCache(connectionDetails, resultsDatabaseSchema="results", vocabDatabaseSchema = "cdm")
Which version of WebAPI are you using?
I figured it out, all working, thanks anyways!
Please let us know what happened and what you did so that others can learn. Thanks!