Use caching to substantially improve performance of orm fetch, and queries in general.
Remove duplicate model and disallow duplicate base orms in different contexts.
Merge branch '22534' into amp_orm