redisCache->get('magazine-' . $parts[2], function (){ throw new \Exception('Not found'); }); foreach ($catIndex->getTags() as $tag) { if ($tag[0] === 'title') { $this->title = $tag[1]; } if ($tag[0] === 'a') { $parts = explode(':', $tag[1]); if (count($parts) === 3) { $fieldQuery = new MatchQuery(); $fieldQuery->setFieldQuery('slug', $parts[2]); $res = $this->finder->find($fieldQuery); $this->list[] = $res[0]; } } if (count($this->list) > 3) { break; } } } }