Method
GenerateCacheKey
(userID int64, relationType string, pagination domain.Pagination)
Source from the content-addressed store, hash-verified
| 96 | } |
| 97 | |
| 98 | func (c *relationCache) GenerateCacheKey(userID int64, relationType string, pagination domain.Pagination) string { |
| 99 | // 生成缓存键 |
| 100 | return fmt.Sprintf("relation:%s:%d:offset=%d:size=%d", |
| 101 | relationType, userID, *pagination.Offset, *pagination.Size) |
| 102 | } |
| 103 | |
| 104 | func (c *relationCache) GenerateCountCacheKey(userID int64, relationType string) string { |
| 105 | // 生成计数缓存键 |
Tested by
no test coverage detected