private function getFeedsList() { if (!($feeds = \Yii::$app->cache->get($this->getFeedsCacheKey()))) { $noReadCountQuery = (new Query())->select('COUNT(id)')->from(NewModel::tableName())->where(new Expression('feed = feeds.id'))->andWhere(['read' => 0]); $feeds = (new Query())->select(['*', 'no_read_count' => $noReadCountQuery])->from(FeedModel::tableName())->where(['user' => \Yii::$app->user->identity->id])->all(); $this->injectFeedIcons($feeds); \Yii::$app->cache->set($this->getFeedsCacheKey(), $feeds); } return $feeds; }