Hi,
I’d like to cache data for ActiveDataProvider, but with no success. My code:
$data =\yii::$app->db->cache(function(){
return Model::find();
});
$dataProvider = new ActiveDataProvider([
'query' => $data
]);
Debugger always shows 2 queries, one for counting records, second for quering data.
How to store AR in Yii2 cache?
Thanks