Task #18203
Fix issues with the implementation of the cache
Start date:
05/04/2024
Due date:
12/04/2024
% Done:
100%
Estimated time:
Description
There are following issues that need to be fixed:
- Modify Load() function to match the signature and functionality described in https://github.com/remiges-tech/crux/wiki/BRE-Implementation#rulesets-cache
- Modify retrieveRulesetFromCache() to load the required ruleset from db only if it doesn't exist in the cache
- Modify retrieveRuleSchemasFromCache() to load the required schema from db only if it doesn't exist in the cache
- Modify update calls of WF to purge the cache
Updated by Tushar Bhingare about 1 year ago
- % Done changed from 0 to 30
modified Load() function to match the signature and functionality
Updated by Tushar Bhingare about 1 year ago
- % Done changed from 30 to 100
- Modify retrieveRulesetFromCache() to load the required ruleset from db only if it doesn't exist in the cache
- Modify retrieveRuleSchemasFromCache() to load the required schema from db only if it doesn't exist in the cache
- We only obtain the cache when the workflow and referring schema are active, and we execute update operations when the schema and workflow are not active, so we are not executing purge operations while updating calls.
- Data never needs to be deleted.
Updated by Tushar Bhingare about 1 year ago
I revamped the cache logic in our program. Now, instead of creating a cache instance every time data is needed, I implemented a system to initialize an empty cache at the program's start. Then, when data is requested, if it's not already in the cache, it dynamically loads the specific data using a load function. This optimization ensures that only necessary data is stored, and the cache instance is created only once per application run, boosting efficiency.