From 6d78e9f59a6fac341840d23544a045853a07fef4 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 21 Mar 2017 14:48:22 -0700 Subject: JSON decoded val for int variants are float64 - need to cast after assertion --- system/db/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/db/cache.go b/system/db/cache.go index 55dd42a..fbb0fd5 100644 --- a/system/db/cache.go +++ b/system/db/cache.go @@ -16,7 +16,7 @@ func CacheControl(next http.Handler) http.HandlerFunc { res.Header().Add("Cache-Control", "no-cache") next.ServeHTTP(res, req) } else { - age := ConfigCache("cache_max_age").(int64) + age := int64(ConfigCache("cache_max_age").(float64)) etag := ConfigCache("etag").(string) if age == 0 { age = DefaultMaxAge -- cgit v1.2.3