Improved model caching