Why does if I set cache lifetime and then get related models than cache doesn't work? example:
$users = User::find([
'cache' => ['lifetime' => 3600, 'key' => 'top-users'],
'limit' => 100,
]);
some view:
foreach ($users as $user) {
echo
"<tr>",
"<td>", $user->name, "</td>",
"<td>", $user->countAvatar() ? $user->avatar->src : "", "</td>",
"</tr>";
}
With related model Avatar view every time loads longest (few seconds) that should be with cache.