Open amarsan opened 1 week ago
The button doesn't seem to reset it's state after clicking:
Should it go back to the blue state after the call is complete, or is it intended to be red after?
@chrisknoll I did not work on that button. I only worked on the "Clear Server Cache" button that is below the table.
That "Refresh Cache" button calls that code that "warms" the cache. The warming is done in an async job.
Ok, sorry. I misunderstood. It hought the individual buttons called the clear cache by source, and you made the bottom one do the same thing for each source.
Ok, can I ask that the buttons next to the source do the following:
I think we want to be able to isolate the clear cache of the individual sources...usually you have mutliple cdms set up and you only want to refresh the cache on one of them at a time.
@chrisknoll Just to clarify...you'd like for the "Refresh Cache" buttons in the source table to both delete cache results and warm the cache. Did I understand that correctly?
Correct! We'd like to clear the cache before warming it.
Also, regarding the button color after the operation is performed...the button turns red if no cache warming occurred, either because warming is not enabled or the source daimon priority is not high enough. It turns blue if warming does happen.
Makes sense: in my DEV env, I disabled all warming caches because I'm launching and relaunching all the time. so I turn that off, but I do want to be able to clear the cache, so making the button do it and then try to warm cache (but reject because it's disabled) is a good behavior.
closes https://github.com/OHDSI/Atlas/issues/2847
Companion PR is https://github.com/OHDSI/WebAPI/pull/2406
I added an .editorconfig file so that this project can have its own style conventions. I noticed that there were mixed spaces/tabs and tab sizes within individual files. I recommend turning whitespace diffs off when reviewing this PR.
There was an existing Clear Server Cache button. I have it pointing now to the new webapi/cdmResults/clearCache endpoint. I fixed the code so that if the clearCache operation returns an error response we alert the user.