2024-03-08 16:30:47 +08:00
|
|
|
package cachekey
|
|
|
|
|
|
|
|
|
|
const (
|
2024-07-16 10:46:21 +08:00
|
|
|
MallocSeq = "MALLOC_SEQ:"
|
|
|
|
|
MallocMinSeqLock = "MALLOC_MIN_SEQ:"
|
|
|
|
|
|
|
|
|
|
SeqUserMaxSeq = "SEQ_USER_MAX:"
|
|
|
|
|
SeqUserMinSeq = "SEQ_USER_MIN:"
|
|
|
|
|
SeqUserReadSeq = "SEQ_USER_READ:"
|
2024-03-08 16:30:47 +08:00
|
|
|
)
|
|
|
|
|
|
2024-07-16 10:46:21 +08:00
|
|
|
func GetMallocSeqKey(conversationID string) string {
|
|
|
|
|
return MallocSeq + conversationID
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func GetMallocMinSeqKey(conversationID string) string {
|
|
|
|
|
return MallocMinSeqLock + conversationID
|
2024-05-27 11:58:36 +08:00
|
|
|
}
|
|
|
|
|
|
2024-07-16 10:46:21 +08:00
|
|
|
func GetSeqUserMaxSeqKey(conversationID string, userID string) string {
|
|
|
|
|
return SeqUserMaxSeq + conversationID + ":" + userID
|
2024-05-27 11:58:36 +08:00
|
|
|
}
|
2024-03-08 16:30:47 +08:00
|
|
|
|
2024-07-16 10:46:21 +08:00
|
|
|
func GetSeqUserMinSeqKey(conversationID string, userID string) string {
|
|
|
|
|
return SeqUserMinSeq + conversationID + ":" + userID
|
2024-03-08 16:30:47 +08:00
|
|
|
}
|
|
|
|
|
|
2024-07-16 10:46:21 +08:00
|
|
|
func GetSeqUserReadSeqKey(conversationID string, userID string) string {
|
|
|
|
|
return SeqUserReadSeq + conversationID + ":" + userID
|
2024-03-08 16:30:47 +08:00
|
|
|
}
|