예제 #1
0
 public function getTexts($category = null, $period = null, $text_search = null, $user_id = null, $offset = 0, $limit = 20)
 {
     $sortByActivity = true;
     if ($text_search || $offset) {
         return ideary::getTextsWithoutCache($category, $period, $text_search, $user_id, $offset, $limit, $sortByActivity);
     }
     $cachedTexts = ShmopCache::get_cache("home");
     if (!$cachedTexts) {
         $cachedTexts = ideary::getTextsWithoutCache($category, $period, $text_search, $user_id, $offset, $limit, $sortByActivity);
         ShmopCache::save_cache($cachedTexts, "home", 600);
     }
     return $cachedTexts;
 }