uint32_t CMessageModel::getMsgId(uint32_t nRelateId) { uint32_t nMsgId = 0; CacheManager* pCacheManager = CacheManager::getInstance(); CacheConn* pCacheConn = pCacheManager->GetCacheConn("unread"); if(pCacheConn) { string strKey = "msg_id_" + int2string(nRelateId); nMsgId = pCacheConn->incrBy(strKey, 1); pCacheManager->RelCacheConn(pCacheConn); } return nMsgId; }