Files

31 lines
785 B
Go
Raw Permalink Normal View History

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-07-16 10:46:21 +08:00
func GetMallocSeqKey(conversationID string) string {
return MallocSeq + conversationID
}
func GetMallocMinSeqKey(conversationID string) string {
return MallocMinSeqLock + conversationID
}
2024-07-16 10:46:21 +08:00
func GetSeqUserMaxSeqKey(conversationID string, userID string) string {
return SeqUserMaxSeq + conversationID + ":" + userID
}
2024-07-16 10:46:21 +08:00
func GetSeqUserMinSeqKey(conversationID string, userID string) string {
return SeqUserMinSeq + conversationID + ":" + userID
}
2024-07-16 10:46:21 +08:00
func GetSeqUserReadSeqKey(conversationID string, userID string) string {
return SeqUserReadSeq + conversationID + ":" + userID
}