|
@@ -18,6 +18,9 @@ func CoalWatchTask(cont context.Context) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// 煤炭市场网的文件缓存任务
|
|
|
+var cacheClient *cache.Cache
|
|
|
+
|
|
|
func ReadWatchIndexFile() {
|
|
|
fmt.Println("ReadWatchIndexFile start", time.Now().Format(utils.FormatDateTime))
|
|
|
var err error
|
|
@@ -26,7 +29,6 @@ func ReadWatchIndexFile() {
|
|
|
fmt.Println("ReadWatchIndexFile Err:" + err.Error())
|
|
|
}
|
|
|
}()
|
|
|
- var cacheClient *cache.Cache
|
|
|
if cacheClient == nil {
|
|
|
cacheClient = cache.New(365*24*time.Hour, 365*24*time.Hour)
|
|
|
}
|