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

PRESIDECMS-2745 add various request level caching to rules engine #1393

Open
wants to merge 9 commits into
base: stable
Choose a base branch
from

Conversation

DominicWatson
Copy link
Contributor

PRESIDECMS-2745 add various request level caching to rules engine.

  • Calculation of any given context's payload
  • Evaluation of an individual expression
  • Evaluation of an entire condition
  • Various other calculations

The idea here is that the result of condition and expression evaluation
will not change within the scope of a request and neither will a payload
for a given context. In complicated pages with a lot of conditions to run,
we can save a lot of resource by caching results.

n.b. While here, also reduce use of member functions.

* Calculation of any given context's payload
* Evaluation of an individual expression
* Evaluation of an entire condition
* Various other calculations

The idea here is that the result of condition and expression evaluation
will not change within the scope of a request and neither will a payload
for a given context. In complicated pages with a lot of conditions to run,
we can save a lot of resource by caching results.

n.b. While here, also reduce use of member functions.
* Calculation of any given context's payload
* Evaluation of an individual expression
* Evaluation of an entire condition
* Various other calculations

The idea here is that the result of condition and expression evaluation
will not change within the scope of a request and neither will a payload
for a given context. In complicated pages with a lot of conditions to run,
we can save a lot of resource by caching results.

n.b. While here, also reduce use of member functions.
…aching' of github.com:pixl8/Preside-CMS into feature-PRESIDECMS-2745_rules-engine-condition-result-caching
…l sends where the context can change in the life of the 'request'
…ached query

This should prevent any compatibility issues where other logic performs this same query and uses the expressions field
This is not necessary as the cache key contains the context payload + expression config so will be fine when context changing in a bg thread
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant