Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ability to re-configure the ConstantExpressionHelper's sliding cache #848

Open
alisterpineda opened this issue Oct 21, 2024 · 0 comments

Comments

@alisterpineda
Copy link

Here is what to include in your request to make sure we implement a solution as quickly as possible.

1. Description

I'd like to propose a way to re-configure the sliding cache used by the ConstantExpressionHelper.

2. Exception

N/A

3. Fiddle or Project

N/A

4. Any further technical details

As it currently stands (to my understanding), the ConstantExpressionHelper is constructed once via ConstantExpressionHelperFactory.

By backtracking on ConstantExpressionHelperFactory.GetInstance() calls, it looks like the only way to configure the sliding cache is via the first usage of extended methods like Where() and others that can take in a ParsingConfig parameter.

I feel like this could be handled better where the sliding cache is configured via some static method as the class itself is virtually a singleton.

This would then make it easier for consumer applications to easily dictate a Time-To-Live setting (for example) that works best for them.

I'm happy to provide a PR if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant