moved cached compiler method to the main compiler class