notification

This commit is contained in:
withchao
2023-05-04 12:11:29 +08:00
parent 0935f1d57b
commit 3e1f97e300
26 changed files with 948 additions and 195 deletions
+2 -2
View File
@@ -17,14 +17,14 @@ const (
friendKey = "FRIEND_INFO:"
)
// args fn will exec when no data in cache
// args fn will exec when no data in msgCache
type FriendCache interface {
metaCache
NewCache() FriendCache
GetFriendIDs(ctx context.Context, ownerUserID string) (friendIDs []string, err error)
// call when friendID List changed
DelFriendIDs(ownerUserID ...string) FriendCache
// get single friendInfo from cache
// get single friendInfo from msgCache
GetFriend(ctx context.Context, ownerUserID, friendUserID string) (friend *relationTb.FriendModel, err error)
// del friend when friend info changed
DelFriend(ownerUserID, friendUserID string) FriendCache