We realized that the cohort results are cached on Atlas and not updated following the underlining CDM changes, unless the cohort definition is changed. This is an issue for us since our OMOP database get monthly update.
Can you please advise how to turn off cohort cache? I couldn’t find instructions on Atlas/WebAPI wiki site.
The invalidAfterDays can be set to 0, and this will cause the cleanup to remove cached data for anyting prior to today. Set it to -1 if you to include the current day.
The cleanupInterval is in milliseconds, so the job will clean up the cache every hour. If you need it more frequent, then reduce that to something like 60000 to have it run every minute.
2: The cleanup interval is just a polling interval…so every time the interval elapses the cleanup will remove any cohort results in the cache that is older than invalidAfterDays. -1 just ensures that everything is invalid.
These two parameters can be set to clean up the cache fast enough so that cached results only live in a very short period, but the cache function is not turned off, is my understanding correct?
In the pom.xml file, there is a setting for result cache warming, what does it do? <cdm.result.cache.warming.enable>true </cdm.result.cache.warming.enable>
This stores record counts, by source_id. It was found that it’s quicker to query record counts by concept ID from the webAPI db instead of querying out to MMP platforms (redshift, netezza, spark, etc), so these records are copied here after they are requested.
achilles_cache is defined as:
CREATE TABLE ${ohdsiSchema}.achilles_cache
(
id bigint NOT NULL DEFAULT nextval('${ohdsiSchema}.achilles_cache_seq'),
source_id int4 NOT NULL,
cache_name varchar NOT NULL,
cache text,
CONSTRAINT achilles_cache_pk PRIMARY KEY (id),
CONSTRAINT achilles_cache_fk FOREIGN KEY (source_id) REFERENCES ${ohdsiSchema}."source" (source_id) ON DELETE CASCADE
);
Tis table caches a JSON (in the text field) report data for the achilles reports. After building the report data from the cdm source, it will cache those results as JSON in this table.
yes, the reason why -1 value works is because it looks at the date of the generation and performs the addition of the days to the generation date and if it is later, than the cache is invalid. -1 causes the result to always be in the past (the day prior) so it will always consider the cache dirty.