index_cache.go 357 B

12345678910111213141516171819
  1. package cache
  2. import (
  3. "fmt"
  4. "hongze/mysteel_watch/global"
  5. "hongze/mysteel_watch/utils"
  6. )
  7. //record more information
  8. func IndexAutoRefresh(filePath string) bool {
  9. if global.Re == nil {
  10. err := global.Rc.LPush(utils.REFRESH_INDEX, filePath)
  11. if err != nil {
  12. fmt.Println("RecordNewLogs LPush Err:" + err.Error())
  13. }
  14. return true
  15. }
  16. return false
  17. }