fix(认证): 订阅兑换失效认证缓存

订阅兑换后同步失效认证缓存避免授权快照滞后
补充单测覆盖订阅兑换的失效场景

测试: go test ./... -tags=unit
This commit is contained in:
yangjianbo
2026-01-10 23:14:20 +08:00
committed by shaw
parent cb3e08dda4
commit d75cd820b0
2 changed files with 6 additions and 1 deletions

View File

@@ -348,6 +348,9 @@ func (s *RedeemService) invalidateRedeemCaches(ctx context.Context, userID int64
return
}
case RedeemTypeSubscription:
if s.authCacheInvalidator != nil {
s.authCacheInvalidator.InvalidateAuthCacheByUserID(ctx, userID)
}
if s.billingCacheService == nil {
return
}