The sentence "is cached" does not completely reflect what happens. Just
think that if an inline eval is not constant over time (except for cases
where a modify is called on the pattern itself), it will generate
inconsistencies on the kbase.
Regarding the second question, regular constraints are much more
efficient than evals.
Edson
2010/6/2 evertp <evert.penninckx(a)gmail.com>
Hi
In the JBoss Rules 5.0 dev guide I read the statement:
When comparing inline eval with standard eval, we can see that they both
must
return true or false. However, inline eval must be a time-constant
expression.
It is evaluated only once and then it is cached by Drools
1. Can I assume that the caching lasts until the session is disposed of?
2. Is there a difference between the conditions Fact( eval(isValid) ) and
Fact( isValid == true ) or are they evaluated in the same way?
-Evert
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/inline-eval-vs-compar...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com