In a sense, yes - but its the result of the comparison that is "cached" really.
In the case you described, it is subrule generation. So either side of the "or" is like a separate rule.
In version 3, the result of isSameAmount (ie if it was true or false) is "cached".
Things will only be re-checked if the "Check" fact changes (and the engine knows about the change).
Note that this checking happens as you are asserting objects, not when you "fireAllRules" necessarily.
What is the extent of the performance impact caused by using predicate
expressions?
Check( amount == $amount )
or
Check( $amt : amount -> (isSameAmount($amt, $amount) )
My understanding is that once asserted the amount property will be
"cached" in the shadow fact, is the result of isSameAmount(...) also
cached?
thanks,
-- yuri
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users