Q regarding rule caching. :thread:
# development
Q regarding rule caching. 🧵
I realize that rule arguments are used to invalidate a rule, but how about Get requests executed during a rule body, if any of those dependent rules are invalidated does that also invalidate the first rule? Example will probably do a better job at illustrating what I’m asking:
Copy code
rule R(A, B) -> Get(Environment, EnvironmentRequest(X)) -> Result
now, if the value for
changes, does that invalidate rule
e.g. the
request is the same, it would only be the resulting environment response that has a changed value.
thus changes will cause rule invalidation
the Pants engine actually parses the source of the rule and extracts
instances in order to do that registration
for details of the source parsing
Thanks. I’m aware of how the Gets are parsed into the rule info, missed the bit about them being registered as edges and what that implied 🙂
still a bit fuzzy for me how the actual values for these edges affect invalidation/caching..
🤔 guess only inputs can affect caching, as the return value would only ever be the case when requested by a rule being evaluated, so the return value will be consumed regardless… OK, I think that makes more sense to me now. Thanks Tom!