Responses from the data services for an entity are cached for 30 days by default. Evaluations that are reran with the same entity information and in the same workflows within 30 days of the last evaluation run will have the cached responses returned instead of new responses. The cache can be refreshed to prompt the data services to rerun and return new responses.
The cache can be refreshed either (1) manually or (2) via the API:
- Refreshing the cache manually
While manually rerunning an evaluation, select the workflow and version you would like to rerun the evaluation through, then scroll down the “Rerun entity” form to the Settings section. Click the “+” symbol to expand it. Check the box next to the Refresh Cache option, then proceed to run the evaluation.
- Refreshing the cache via the API
The following header can be added to the POST request while rerunning an evaluation:
H "Alloy-Refresh-Cache: true" \
See our developer page for more information.
To check whether an evaluation run used cached data, users can check the evaluation's raw response.
"Executed" indicates that the data services were called to return new responses for the evaluation. "Cached" indicates that the data services were not called, but rather cached responses from the data services were used for the evaluation. If the PII data on the evaluation hasn't changed, the most efficient method is to use the cached response we got back from the data service so an extra API call doesn’t have to be made, unless necessary.
If multiple evaluations are submitted within minutes, but the PII for every evaluation has changed, the result will be executed data.
If it was the same entity, the expected behavior is for the data services to be called again (“executed”) in scenarios where the PII data is changed. We would expect the data service to not be called again in scenarios where the supplied PII does not change and the evaluation is run again within 30 days.