The sentence &quot;is cached&quot; 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.<div>
<br></div><div>    Regarding the second question, regular constraints are much more efficient than evals. </div><div><br></div><div>    Edson<br><br><div class="gmail_quote">2010/6/2 evertp <span dir="ltr">&lt;<a href="mailto:evert.penninckx@gmail.com">evert.penninckx@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Hi<br>
<br>
In the JBoss Rules 5.0 dev guide I read the statement:<br>
<br>
When comparing inline eval with standard eval, we can see that they both<br>
must<br>
return true or false. However, inline eval must be a time-constant<br>
expression.<br>
It is evaluated only once and then it is cached by Drools<br>
<br>
1. Can I assume that the caching lasts until the session is disposed of?<br>
<br>
2. Is there a difference between the conditions Fact( eval(isValid) ) and<br>
Fact( isValid == true ) or are they evaluated in the same way?<br>
<br>
<br>
<br>
<br>
-Evert<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/inline-eval-vs-comparing-booleans-tp864103p864103.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/inline-eval-vs-comparing-booleans-tp864103p864103.html</a><br>

Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>