OHDSI Home | Forums | Wiki | Github

How to force the update of reports in Atlas

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:

  1. Load incremental data into the CDM on a weekly basis
  2. Run the Achilles R scripts after the data load completes
  3. Clear the Webapi cache tables in Postgres
  4. 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.

               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!

Hi - We’re having a similar issue. This thread shows up when searching on Google, so I’m sure others are coming here. It would be great if you could update how you fixed it. I know it’s been a while, but it would really be beneficial. Thanks!

Hi @Zachary-Higgins

We are also facing the same problem but tried out the simple solution from this comment from Atlas git repo.

Basically, clear out the contents of the cdm_cache table from the PostgreSQL server. For reference, we are using Atlas v2.12.0 and WebAPI 2.12.0.