If this was @exists, then this would already be cached: you could say "if @exists == undef" here and set @exists based on the existence of a parent.child().  At the end, just return @exists.  Again, not necessary to fix in this patch.