3 ms·
You need to be careful with caching inside models, because you want your models to reflect the current, completely up-to-date state of the application. Conceptu
by danmaz74 6y ago
You need to be careful with caching inside models, because you want your models to reflect the current, completely up-to-date state of the application. Conceptually, the best place to do it is inside controllers, where you know when you can serve data which isn't completely up to date.
With skinny controllers, very often you have some specific places (eg service objects or similar layers) where the controller logic lives, and that is where you can do your caching.