Browse Source

重构:重构缓存机制以提高性能

-
将`holidayCache`从指针更新为值类型`cache`
-

Signed-off-by: u <u@a.com>
fast
u 2 years ago
parent
commit
9b5034c1e3
  1. 2
      core.go

2
core.go

@ -376,7 +376,7 @@ func jsonEncode(v interface{}) string {
var GetHolidaysData func() ([]HolidaysItem, error)
var holidayCache *cache
var holidayCache cache
var holidayCacheLock sync.Mutex
func GetHolidaysDataWithCache() ([]HolidaysItem, error) {

Loading…
Cancel
Save