|
@@ -282,19 +282,22 @@ func GetRedisKeyTimeout(status int, positionId int64) config.CacheConfig {
|
|
switch status {
|
|
switch status {
|
|
case StatusNoLogin:
|
|
case StatusNoLogin:
|
|
redisKey = IC.C.NewsCache.NoLogin.Key
|
|
redisKey = IC.C.NewsCache.NoLogin.Key
|
|
- redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
|
|
|
|
|
|
+ //redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
|
|
|
|
+ redisKey = fmt.Sprintf(redisKey, time.Now().Year(), 8, 8) //最开始逻辑是每日更新---》每7天更新一次;不麻烦改配置,就改代码默认月份是8 日期是8
|
|
timeOut = IC.C.NewsCache.NoLogin.Timeout
|
|
timeOut = IC.C.NewsCache.NoLogin.Timeout
|
|
cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.NoLogin.CacheUpdateKey)
|
|
cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.NoLogin.CacheUpdateKey)
|
|
cuTimeOut = IC.C.NewsCache.NoLogin.CacheUpdateTimeout
|
|
cuTimeOut = IC.C.NewsCache.NoLogin.CacheUpdateTimeout
|
|
case StatusLoginUser:
|
|
case StatusLoginUser:
|
|
redisKey = IC.C.NewsCache.LoginUser.Key // 登录用户使用的缓存key
|
|
redisKey = IC.C.NewsCache.LoginUser.Key // 登录用户使用的缓存key
|
|
- redisKey = fmt.Sprintf(redisKey, positionId, time.Now().Year(), time.Now().Month(), time.Now().Day())
|
|
|
|
|
|
+ //redisKey = fmt.Sprintf(redisKey, positionId, time.Now().Year(), time.Now().Month(), time.Now().Day())
|
|
|
|
+ redisKey = fmt.Sprintf(redisKey, positionId, time.Now().Year(), 8, 8) //
|
|
timeOut = IC.C.NewsCache.LoginUser.Timeout
|
|
timeOut = IC.C.NewsCache.LoginUser.Timeout
|
|
cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.LoginUser.CacheUpdateKey)
|
|
cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.LoginUser.CacheUpdateKey)
|
|
cuTimeOut = IC.C.NewsCache.LoginUser.CacheUpdateTimeout
|
|
cuTimeOut = IC.C.NewsCache.LoginUser.CacheUpdateTimeout
|
|
case StatusLogin:
|
|
case StatusLogin:
|
|
redisKey = IC.C.NewsCache.Login.Key // 登录用户使用的最新标讯缓存key
|
|
redisKey = IC.C.NewsCache.Login.Key // 登录用户使用的最新标讯缓存key
|
|
- redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
|
|
|
|
|
|
+ //redisKey = fmt.Sprintf(redisKey, time.Now().Year(), time.Now().Month(), time.Now().Day())
|
|
|
|
+ redisKey = fmt.Sprintf(redisKey, time.Now().Year(), 8, 8) //
|
|
timeOut = IC.C.NewsCache.Login.Timeout
|
|
timeOut = IC.C.NewsCache.Login.Timeout
|
|
cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.Login.CacheUpdateKey)
|
|
cuKey = fmt.Sprintf("%s_%s", redisKey, IC.C.NewsCache.Login.CacheUpdateKey)
|
|
cuTimeOut = IC.C.NewsCache.Login.CacheUpdateTimeout
|
|
cuTimeOut = IC.C.NewsCache.Login.CacheUpdateTimeout
|