|
@@ -21,7 +21,7 @@ func (s *SwordFish) Swordfish() error {
|
|
|
s.T["data"] = r
|
|
|
}
|
|
|
content, _ := s.Render4Cache("/swordfish/index.html", &s.T)
|
|
|
- redis.Put("other", "swordfish", string(content), 30*60*1000) //缓存半个小时
|
|
|
+ redis.Put("other", "swordfish", string(content), 30*60) //缓存半个小时
|
|
|
return s.SetBody(content)
|
|
|
}
|
|
|
}
|
|
@@ -158,7 +158,7 @@ func getNewest() (list []interface{}) {
|
|
|
now := time.Now()
|
|
|
unix := time.Date(now.Year(), now.Month(), now.Day(), now.Hour()-2, now.Minute(), now.Second(), now.Nanosecond(), time.Local).Unix()
|
|
|
r := mongodb.Find("bidding", bson.M{"comeintime": bson.M{"$lte": unix}}, `{"comeintime":-1}`, `{"title":1,"href":1,"publishtime":1}`, false, 0, 5)
|
|
|
- redis.Put("other", "swordfish_newest_list", *r, 30*60*1000) //缓存半个小时
|
|
|
+ redis.Put("other", "swordfish_newest_list", *r, 30*60) //缓存半个小时
|
|
|
for _, v := range *r {
|
|
|
list = append(list, v)
|
|
|
}
|