示例#1
0
 function act_getAccountList()
 {
     global $memc_obj;
     $cacheName = md5("om_system_account");
     $list = $memc_obj->get_extral($cacheName);
     if ($list) {
         return json_encode($list);
     } else {
         $accountList = omAccountModel::accountList();
         if (!$accountList) {
             self::$errCode = 101;
             self::$errMsg = "没取到账号列表!";
             return;
         } else {
             $isok = $memc_obj->set_extral($cacheName, $accountList);
             if (!$isok) {
                 self::$errCode = 102;
                 self::$errMsg = 'memcache缓存账号信息出错!';
                 return json_encode($accountList);
             }
             return json_encode($accountList);
         }
     }
 }