|
@ -129,18 +129,18 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool { |
|
|
tfdate := t.Format("2006-01-02") |
|
|
tfdate := t.Format("2006-01-02") |
|
|
|
|
|
|
|
|
mainKey := fmt.Sprintf("[%s][%s]", tfdate, strings.Join(ta.TimesOnDay, "|")) |
|
|
mainKey := fmt.Sprintf("[%s][%s]", tfdate, strings.Join(ta.TimesOnDay, "|")) |
|
|
value, ok := isInTimeOfDayCacheBool.Load(mainKey) |
|
|
|
|
|
if ok { |
|
|
|
|
|
ret, ok := value.(int) |
|
|
|
|
|
if ok { |
|
|
|
|
|
if ret == 1 { |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
if ret == 2 { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// value, ok := isInTimeOfDayCacheBool.Load(mainKey)
|
|
|
|
|
|
// if ok {
|
|
|
|
|
|
// ret, ok := value.(int)
|
|
|
|
|
|
// if ok {
|
|
|
|
|
|
// if ret == 1 {
|
|
|
|
|
|
// return true
|
|
|
|
|
|
// }
|
|
|
|
|
|
// if ret == 2 {
|
|
|
|
|
|
// return false
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
parseInLocationCache := map[string]time.Time{} |
|
|
parseInLocationCache := map[string]time.Time{} |
|
|
var err error |
|
|
var err error |
|
|