@ -85,7 +85,7 @@ func (rc *Client) GetFriendIDListFromCache(ctx context.Context, userID string) (
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "friendIDList" , friendIDList )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "friendIDList" , friendIDList )
} ( )
} ( )
friendIDListStr , err := db . DB . Rc . Fetch ( friendRelationCache + userID , time . Second * 30 * 60 , getFriendIDList )
friendIDListStr , err := db . DB . Rc . Fetch ( friendRelationCache + userID , time . Second * 30 * 60 , getFriendIDList )
if err != nil {
if err != nil {
@ -97,7 +97,7 @@ func (rc *Client) GetFriendIDListFromCache(ctx context.Context, userID string) (
func DelFriendIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
func DelFriendIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( friendRelationCache + userID )
return db . DB . Rc . TagAsDeleted ( friendRelationCache + userID )
}
}
@ -115,7 +115,7 @@ func GetBlackListFromCache(ctx context.Context, userID string) (blackIDs []strin
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "blackIDList" , blackIDs )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "blackIDList" , blackIDs )
} ( )
} ( )
blackIDListStr , err := db . DB . Rc . Fetch ( blackListCache + userID , time . Second * 30 * 60 , getBlackIDList )
blackIDListStr , err := db . DB . Rc . Fetch ( blackListCache + userID , time . Second * 30 * 60 , getBlackIDList )
if err != nil {
if err != nil {
@ -127,7 +127,7 @@ func GetBlackListFromCache(ctx context.Context, userID string) (blackIDs []strin
func DelBlackIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
func DelBlackIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ctx" , ctx )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ctx" , ctx )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( blackListCache + userID )
return db . DB . Rc . TagAsDeleted ( blackListCache + userID )
}
}
@ -145,7 +145,7 @@ func GetJoinedGroupIDListFromCache(ctx context.Context, userID string) (joinedGr
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "joinedGroupList" , joinedGroupList )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "joinedGroupList" , joinedGroupList )
} ( )
} ( )
joinedGroupIDListStr , err := db . DB . Rc . Fetch ( joinedGroupListCache + userID , time . Second * 30 * 60 , getJoinedGroupIDList )
joinedGroupIDListStr , err := db . DB . Rc . Fetch ( joinedGroupListCache + userID , time . Second * 30 * 60 , getJoinedGroupIDList )
if err != nil {
if err != nil {
@ -157,7 +157,7 @@ func GetJoinedGroupIDListFromCache(ctx context.Context, userID string) (joinedGr
func DelJoinedGroupIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
func DelJoinedGroupIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( joinedGroupListCache + userID )
return db . DB . Rc . TagAsDeleted ( joinedGroupListCache + userID )
}
}
@ -188,7 +188,7 @@ func GetGroupMemberIDListFromCache(ctx context.Context, groupID string) (groupMe
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "groupMemberIDList" , groupMemberIDList )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "groupMemberIDList" , groupMemberIDList )
} ( )
} ( )
groupIDListStr , err := db . DB . Rc . Fetch ( groupCache + groupID , time . Second * 30 * 60 , f )
groupIDListStr , err := db . DB . Rc . Fetch ( groupCache + groupID , time . Second * 30 * 60 , f )
if err != nil {
if err != nil {
@ -200,7 +200,7 @@ func GetGroupMemberIDListFromCache(ctx context.Context, groupID string) (groupMe
func DelGroupMemberIDListFromCache ( ctx context . Context , groupID string ) ( err error ) {
func DelGroupMemberIDListFromCache ( ctx context . Context , groupID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( groupCache + groupID )
return db . DB . Rc . TagAsDeleted ( groupCache + groupID )
}
}
@ -218,7 +218,7 @@ func GetUserInfoFromCache(ctx context.Context, userID string) (userInfo *relatio
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "userInfo" , * userInfo )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "userInfo" , * userInfo )
} ( )
} ( )
userInfoStr , err := db . DB . Rc . Fetch ( userInfoCache + userID , time . Second * 30 * 60 , getUserInfo )
userInfoStr , err := db . DB . Rc . Fetch ( userInfoCache + userID , time . Second * 30 * 60 , getUserInfo )
if err != nil {
if err != nil {
@ -243,7 +243,7 @@ func GetUserInfoFromCacheBatch(ctx context.Context, userIDs []string) ([]*relati
func DelUserInfoFromCache ( ctx context . Context , userID string ) ( err error ) {
func DelUserInfoFromCache ( ctx context . Context , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( userInfoCache + userID )
return db . DB . Rc . TagAsDeleted ( userInfoCache + userID )
}
}
@ -261,7 +261,7 @@ func GetGroupMemberInfoFromCache(ctx context.Context, groupID, userID string) (g
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "userID" , userID , "groupMember" , * groupMember )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "userID" , userID , "groupMember" , * groupMember )
} ( )
} ( )
groupMemberInfoStr , err := db . DB . Rc . Fetch ( groupMemberInfoCache + groupID + "-" + userID , time . Second * 30 * 60 , getGroupMemberInfo )
groupMemberInfoStr , err := db . DB . Rc . Fetch ( groupMemberInfoCache + groupID + "-" + userID , time . Second * 30 * 60 , getGroupMemberInfo )
if err != nil {
if err != nil {
@ -274,14 +274,14 @@ func GetGroupMemberInfoFromCache(ctx context.Context, groupID, userID string) (g
func DelGroupMemberInfoFromCache ( ctx context . Context , groupID , userID string ) ( err error ) {
func DelGroupMemberInfoFromCache ( ctx context . Context , groupID , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "userID" , userID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "userID" , userID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( groupMemberInfoCache + groupID + "-" + userID )
return db . DB . Rc . TagAsDeleted ( groupMemberInfoCache + groupID + "-" + userID )
}
}
func GetGroupMembersInfoFromCache ( ctx context . Context , count , offset int32 , groupID string ) ( groupMembers [ ] * relation . GroupMember , err error ) {
func GetGroupMembersInfoFromCache ( ctx context . Context , count , offset int32 , groupID string ) ( groupMembers [ ] * relation . GroupMember , err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "count" , count , "offset" , offset , "groupID" , groupID , "groupMember" , groupMembers )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "count" , count , "offset" , offset , "groupID" , groupID , "groupMember" , groupMembers )
} ( )
} ( )
groupMemberIDList , err := GetGroupMemberIDListFromCache ( ctx , groupID )
groupMemberIDList , err := GetGroupMemberIDListFromCache ( ctx , groupID )
if err != nil {
if err != nil {
@ -328,7 +328,7 @@ func GetGroupMembersInfoFromCache(ctx context.Context, count, offset int32, grou
func GetAllGroupMembersInfoFromCache ( ctx context . Context , groupID string ) ( groupMembers [ ] * relation . GroupMember , err error ) {
func GetAllGroupMembersInfoFromCache ( ctx context . Context , groupID string ) ( groupMembers [ ] * relation . GroupMember , err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "groupMembers" , groupMembers )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "groupMembers" , groupMembers )
} ( )
} ( )
getGroupMemberInfo := func ( ) ( string , error ) {
getGroupMemberInfo := func ( ) ( string , error ) {
groupMembers , err := relation . GetGroupMemberListByGroupID ( groupID )
groupMembers , err := relation . GetGroupMemberListByGroupID ( groupID )
@ -351,7 +351,7 @@ func GetAllGroupMembersInfoFromCache(ctx context.Context, groupID string) (group
func DelAllGroupMembersInfoFromCache ( ctx context . Context , groupID string ) ( err error ) {
func DelAllGroupMembersInfoFromCache ( ctx context . Context , groupID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( groupAllMemberInfoCache + groupID )
return db . DB . Rc . TagAsDeleted ( groupAllMemberInfoCache + groupID )
}
}
@ -400,7 +400,7 @@ func GetAllFriendsInfoFromCache(ctx context.Context, userID string) (friends []*
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "friends" , friends )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "friends" , friends )
} ( )
} ( )
allFriendInfoStr , err := db . DB . Rc . Fetch ( allFriendInfoCache + userID , time . Second * 30 * 60 , getAllFriendInfo )
allFriendInfoStr , err := db . DB . Rc . Fetch ( allFriendInfoCache + userID , time . Second * 30 * 60 , getAllFriendInfo )
if err != nil {
if err != nil {
@ -412,7 +412,7 @@ func GetAllFriendsInfoFromCache(ctx context.Context, userID string) (friends []*
func DelAllFriendsInfoFromCache ( ctx context . Context , userID string ) ( err error ) {
func DelAllFriendsInfoFromCache ( ctx context . Context , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( allFriendInfoCache + userID )
return db . DB . Rc . TagAsDeleted ( allFriendInfoCache + userID )
}
}
@ -430,7 +430,7 @@ func GetJoinedSuperGroupListFromCache(ctx context.Context, userID string) (joine
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "joinedSuperGroupIDs" , joinedSuperGroupIDs )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "joinedSuperGroupIDs" , joinedSuperGroupIDs )
} ( )
} ( )
joinedSuperGroupListStr , err := db . DB . Rc . Fetch ( joinedSuperGroupListCache + userID , time . Second * 30 * 60 , getJoinedSuperGroupIDList )
joinedSuperGroupListStr , err := db . DB . Rc . Fetch ( joinedSuperGroupListCache + userID , time . Second * 30 * 60 , getJoinedSuperGroupIDList )
if err != nil {
if err != nil {
@ -442,7 +442,7 @@ func GetJoinedSuperGroupListFromCache(ctx context.Context, userID string) (joine
func DelJoinedSuperGroupIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
func DelJoinedSuperGroupIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( joinedSuperGroupListCache + userID )
return db . DB . Rc . TagAsDeleted ( joinedSuperGroupListCache + userID )
}
}
@ -470,7 +470,7 @@ func GetGroupMemberListHashFromCache(ctx context.Context, groupID string) (hashC
return strconv . Itoa ( int ( bi . Uint64 ( ) ) ) , nil
return strconv . Itoa ( int ( bi . Uint64 ( ) ) ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "hashCodeUint64" , hashCodeUint64 )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "hashCodeUint64" , hashCodeUint64 )
} ( )
} ( )
hashCodeStr , err := db . DB . Rc . Fetch ( groupMemberListHashCache + groupID , time . Second * 30 * 60 , generateHash )
hashCodeStr , err := db . DB . Rc . Fetch ( groupMemberListHashCache + groupID , time . Second * 30 * 60 , generateHash )
if err != nil {
if err != nil {
@ -482,7 +482,7 @@ func GetGroupMemberListHashFromCache(ctx context.Context, groupID string) (hashC
func DelGroupMemberListHashFromCache ( ctx context . Context , groupID string ) ( err error ) {
func DelGroupMemberListHashFromCache ( ctx context . Context , groupID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( groupMemberListHashCache + groupID )
return db . DB . Rc . TagAsDeleted ( groupMemberListHashCache + groupID )
}
}
@ -496,7 +496,7 @@ func GetGroupMemberNumFromCache(ctx context.Context, groupID string) (num int, e
return strconv . Itoa ( int ( num ) ) , nil
return strconv . Itoa ( int ( num ) ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "num" , num )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID , "num" , num )
} ( )
} ( )
groupMember , err := db . DB . Rc . Fetch ( groupMemberNumCache + groupID , time . Second * 30 * 60 , getGroupMemberNum )
groupMember , err := db . DB . Rc . Fetch ( groupMemberNumCache + groupID , time . Second * 30 * 60 , getGroupMemberNum )
if err != nil {
if err != nil {
@ -507,7 +507,7 @@ func GetGroupMemberNumFromCache(ctx context.Context, groupID string) (num int, e
func DelGroupMemberNumFromCache ( ctx context . Context , groupID string ) ( err error ) {
func DelGroupMemberNumFromCache ( ctx context . Context , groupID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "groupID" , groupID )
} ( )
} ( )
return db . DB . Rc . TagAsDeleted ( groupMemberNumCache + groupID )
return db . DB . Rc . TagAsDeleted ( groupMemberNumCache + groupID )
}
}
@ -526,7 +526,7 @@ func GetUserConversationIDListFromCache(ctx context.Context, userID string) (con
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "conversationIDs" , conversationIDs )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID , "conversationIDs" , conversationIDs )
} ( )
} ( )
conversationIDListStr , err := db . DB . Rc . Fetch ( conversationIDListCache + userID , time . Second * 30 * 60 , getConversationIDList )
conversationIDListStr , err := db . DB . Rc . Fetch ( conversationIDListCache + userID , time . Second * 30 * 60 , getConversationIDList )
err = json . Unmarshal ( [ ] byte ( conversationIDListStr ) , & conversationIDs )
err = json . Unmarshal ( [ ] byte ( conversationIDListStr ) , & conversationIDs )
@ -538,7 +538,7 @@ func GetUserConversationIDListFromCache(ctx context.Context, userID string) (con
func DelUserConversationIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
func DelUserConversationIDListFromCache ( ctx context . Context , userID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "userID" , userID )
} ( )
} ( )
return utils . Wrap ( db . DB . Rc . TagAsDeleted ( conversationIDListCache + userID ) , "DelUserConversationIDListFromCache err" )
return utils . Wrap ( db . DB . Rc . TagAsDeleted ( conversationIDListCache + userID ) , "DelUserConversationIDListFromCache err" )
}
}
@ -556,7 +556,7 @@ func GetConversationFromCache(ctx context.Context, ownerUserID, conversationID s
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversationID" , conversationID , "conversation" , * conversation )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversationID" , conversationID , "conversation" , * conversation )
} ( )
} ( )
conversationStr , err := db . DB . Rc . Fetch ( conversationCache + ownerUserID + ":" + conversationID , time . Second * 30 * 60 , getConversation )
conversationStr , err := db . DB . Rc . Fetch ( conversationCache + ownerUserID + ":" + conversationID , time . Second * 30 * 60 , getConversation )
if err != nil {
if err != nil {
@ -569,7 +569,7 @@ func GetConversationFromCache(ctx context.Context, ownerUserID, conversationID s
func GetConversationsFromCache ( ctx context . Context , ownerUserID string , conversationIDs [ ] string ) ( conversations [ ] relation . Conversation , err error ) {
func GetConversationsFromCache ( ctx context . Context , ownerUserID string , conversationIDs [ ] string ) ( conversations [ ] relation . Conversation , err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversationIDs" , conversationIDs , "conversations" , conversations )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversationIDs" , conversationIDs , "conversations" , conversations )
} ( )
} ( )
for _ , conversationID := range conversationIDs {
for _ , conversationID := range conversationIDs {
conversation , err := GetConversationFromCache ( ctx , ownerUserID , conversationID )
conversation , err := GetConversationFromCache ( ctx , ownerUserID , conversationID )
@ -583,7 +583,7 @@ func GetConversationsFromCache(ctx context.Context, ownerUserID string, conversa
func GetUserAllConversationList ( ctx context . Context , ownerUserID string ) ( conversations [ ] relation . Conversation , err error ) {
func GetUserAllConversationList ( ctx context . Context , ownerUserID string ) ( conversations [ ] relation . Conversation , err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversations" , conversations )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversations" , conversations )
} ( )
} ( )
IDList , err := GetUserConversationIDListFromCache ( ctx , ownerUserID )
IDList , err := GetUserConversationIDListFromCache ( ctx , ownerUserID )
if err != nil {
if err != nil {
@ -603,7 +603,7 @@ func GetUserAllConversationList(ctx context.Context, ownerUserID string) (conver
func DelConversationFromCache ( ctx context . Context , ownerUserID , conversationID string ) ( err error ) {
func DelConversationFromCache ( ctx context . Context , ownerUserID , conversationID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversationID" , conversationID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "ownerUserID" , ownerUserID , "conversationID" , conversationID )
} ( )
} ( )
return utils . Wrap ( db . DB . Rc . TagAsDeleted ( conversationCache + ownerUserID + ":" + conversationID ) , "DelConversationFromCache err" )
return utils . Wrap ( db . DB . Rc . TagAsDeleted ( conversationCache + ownerUserID + ":" + conversationID ) , "DelConversationFromCache err" )
}
}
@ -621,7 +621,7 @@ func GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clien
return string ( bytes ) , nil
return string ( bytes ) , nil
}
}
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "sourceID" , sourceID , "sessionType" ,
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "sourceID" , sourceID , "sessionType" ,
sessionType , "clientMsgID" , clientMsgID , "firstModifyTime" , firstModifyTime , "extendMsg" , extendMsg )
sessionType , "clientMsgID" , clientMsgID , "firstModifyTime" , firstModifyTime , "extendMsg" , extendMsg )
} ( )
} ( )
extendMsgStr , err := db . DB . Rc . Fetch ( extendMsgCache + clientMsgID , time . Second * 30 * 60 , getExtendMsg )
extendMsgStr , err := db . DB . Rc . Fetch ( extendMsgCache + clientMsgID , time . Second * 30 * 60 , getExtendMsg )
@ -635,7 +635,7 @@ func GetExtendMsg(ctx context.Context, sourceID string, sessionType int32, clien
func DelExtendMsg ( ctx context . Context , clientMsgID string ) ( err error ) {
func DelExtendMsg ( ctx context . Context , clientMsgID string ) ( err error ) {
defer func ( ) {
defer func ( ) {
trace _ log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "clientMsgID" , clientMsgID )
trace log. SetCtxDebug ( ctx , utils . GetFuncName ( 1 ) , err , "clientMsgID" , clientMsgID )
} ( )
} ( )
return utils . Wrap ( db . DB . Rc . TagAsDeleted ( extendMsgCache + clientMsgID ) , "DelExtendMsg err" )
return utils . Wrap ( db . DB . Rc . TagAsDeleted ( extendMsgCache + clientMsgID ) , "DelExtendMsg err" )
}
}