Optimize parsing by caching rules in maps by domain.