Cache models in memory