123456789101112131415161718192021222324 |
- package cache
- import (
- "fmt"
- "hongze/mysteel_watch/global"
- "hongze/mysteel_watch/utils"
- )
- //record more information
- func IndexAutoRefresh(filePath string) bool {
- if global.Re == nil {
- if global.Rc != nil {
- if global.Rc.SetNX(filePath,filePath,utils.GetTodayLastSecond()){
- err := global.Rc.LPush(utils.REFRESH_INDEX, filePath)
- if err != nil {
- fmt.Println("RecordNewLogs LPush Err:" + err.Error())
- }
- return true
- }
- }
- return true
- }
- return false
- }
|