32 lines
884 B
Go
32 lines
884 B
Go
package consts
|
|
|
|
const (
|
|
AdRequestLimitKeyPrefix = "ad_request_limit:" // 广告请求限流键前缀
|
|
RateLimitKeyPrefix = "rate_limit:" // 通用限流键前缀
|
|
SessionCacheKeyPrefix = "session_cache:" // 会话缓存键前缀
|
|
)
|
|
|
|
// 广告缓存键
|
|
const (
|
|
AdCacheKeyPrefix = "cid:ad:" // 广告缓存前缀
|
|
AdPositionCacheKeyPrefix = "cid:pos:" // 广告位缓存前缀
|
|
AdvertiserCacheKeyPrefix = "cid:adv:" // 广告主缓存前缀
|
|
)
|
|
|
|
// 广告匹配键
|
|
const (
|
|
AdMatchingKeyPrefix = "cid:match:" // 广告匹配键前缀
|
|
UserProfileKeyPrefix = "cid:user:" // 用户画像键前缀
|
|
)
|
|
|
|
// 限流键
|
|
const (
|
|
ApiRequestLimitKeyPrefix = "cid:limit:api:" // API请求限流键前缀
|
|
)
|
|
|
|
// Stream键
|
|
const (
|
|
AdEventStreamKey = "cid:stream:ad_event" // 广告事件流
|
|
UserBehaviorStreamKey = "cid:stream:user_behavior" // 用户行为流
|
|
)
|