/** * Получает список тегов по первым буквам тега * * @param string $sTag Тэг * @param int $iLimit Количество * @return bool */ public function GetTopicTagsByLike($sTag, $iLimit) { if (false === ($data = $this->Cache_Get("tag_like_{$sTag}_{$iLimit}"))) { $data = $this->oMapperTopic->GetTopicTagsByLike($sTag, $iLimit); $this->Cache_Set($data, "tag_like_{$sTag}_{$iLimit}", array("topic_update", "topic_new"), 60 * 60 * 24 * 3); } return $data; }
/** * Получает список тегов по первым буквам тега * * @param string $sTag - Тэг * @param int $nLimit - Количество * * @return bool */ public function GetTopicTagsByLike($sTag, $nLimit) { $sCacheKey = "tag_like_{$sTag}_{$nLimit}"; if (false === ($data = E::ModuleCache()->Get($sCacheKey))) { $data = $this->oMapper->GetTopicTagsByLike($sTag, $nLimit); E::ModuleCache()->Set($data, $sCacheKey, array("topic_update", "topic_new"), 60 * 60 * 24 * 3); } return $data; }