Fix inheritance issues

Remove global _temp_rule_cache variable and the _rule_cache now lies on the method itself