FORGE-1699: Improve performance of ResourceFactory by caching generators directly.