RulesEngine icon indicating copy to clipboard operation
RulesEngine copied to clipboard

Update MemCache.cs

Open taskinozdemir opened this issue 2 years ago • 3 comments

We need to disable memory cache. If we set size limit to 0 or negative it will always try to clear queue. There is a defect here.

Capture

taskinozdemir avatar Feb 17 '23 14:02 taskinozdemir

@taskinozdemir thanks for raising this PR. Is there a specific requirement to enable/disable cache? If yes we might need to modify RuleExpressionParser to support no-cache scenarios.

Also, we would need to add test case for no cache scenario as I think it might break the existing flow

abbasc52 avatar Feb 20 '23 06:02 abbasc52

We are using ruleengine in gateway for transforming requests to our model. It uses half of the memory of our gateway. 200Mb for each pod. There are 10 pods in cluster. We don't want to reserve that memory.

taskinozdemir avatar Feb 20 '23 08:02 taskinozdemir

@taskinozdemir Thanks for the information. As I mentioned earlier 0 as cache limit might not work. You could use a smaller limit (let say <10). Also I would need you to update RuleExpressionParser file to read MemCache config from ReSettings.

abbasc52 avatar Feb 20 '23 09:02 abbasc52