|
@@ -9,6 +9,7 @@ import (
|
|
|
"jyBXBase/rpc/bxbase"
|
|
|
IC "jyBXBase/rpc/init"
|
|
|
"jyBXBase/rpc/internal/config"
|
|
|
+ "jyBXBase/rpc/util"
|
|
|
"log"
|
|
|
"sort"
|
|
|
"strings"
|
|
@@ -326,6 +327,7 @@ func PutNewsCache(redisKey string, redisTimeout int, list []*bxbase.NewestList)
|
|
|
log.Printf("保存缓存 序列化异常,data:%s,err:%s\n", list, err.Error())
|
|
|
return
|
|
|
}
|
|
|
+ redisTimeout = redisTimeout + util.GetRand(604800) //缓存时间随机性7d+
|
|
|
if err = redis.PutBytes("new", redisKey, &b, redisTimeout); err != nil {
|
|
|
log.Printf("保存缓存 redis 异常,key:%s,err:%s\n", redisKey, err.Error())
|
|
|
}
|
|
@@ -393,7 +395,7 @@ func ExtendNewListCache(n *NewSet, in *bxbase.NewestBiddingReq, list []*bxbase.N
|
|
|
entity.ReqLimitLock.Unlock()
|
|
|
if !isDoing {
|
|
|
entity.ReqLimitLock.Lock()
|
|
|
- redis.Put("new", fmt.Sprintf("p1_indexMessage_new_recovery_%d", in.PositionId), "1", 15*time.Now().Minute()) //十五分钟
|
|
|
+ redis.Put("new", fmt.Sprintf("p1_indexMessage_new_recovery_%d", in.PositionId), "1", 15*60) //十五分钟
|
|
|
entity.ReqLimitLock.Unlock()
|
|
|
switch n.RedisStatus {
|
|
|
case StatusLoginUser:
|