예제 #1
0
 public function run($fid = 0, $type = '')
 {
     global $_G;
     if ($type == 'rec') {
         $res = $this->getResult(array('fid' => $fid, 'type' => $type));
         echo WebUtils::outputWebApi($res, '', true);
     }
     $key = CacheUtils::getForumListKey(array($fid, $_G['groupid'], $type));
     $this->runWithCache($key, array('fid' => $fid));
 }
예제 #2
0
 public function actionClean($fid = 0, $gid = 0, $sort = '')
 {
     if ($fid == 0 && $gid == 0) {
         Yii::app()->cache->flush();
     } else {
         Yii::app()->cache->delete(CacheUtils::getForumListKey());
         $sortArr = array('', 'new', 'marrow', 'top');
         $fids = $this->_getFids($fid);
         $gids = $this->_getGids($gid);
         foreach ($sortArr as $sort) {
             foreach ($fids as $fid) {
                 foreach ($gids as $gid) {
                     $key = CacheUtils::getTopicListKey($fid, $gid, 1, 10, $sort);
                     Yii::app()->cache->delete($key);
                 }
             }
         }
     }
     echo '清空缓存成功!!!';
 }
예제 #3
0
 public function run($fid = 0)
 {
     global $_G;
     $key = CacheUtils::getForumListKey(array($fid, $_G['groupid']));
     $this->runWithCache($key, array('fid' => $fid));
 }