Task #18203
Fix issues with the implementation of the cache
Added by Tushar Bhingare about 1 year ago.
Updated about 1 year ago.
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
- Status changed from New to In Progress
- % Done changed from 0 to 30
modified Load() function to match the signature and functionality
- % 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.
- Status changed from In Progress to Closed
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.
Also available in: Atom
PDF