diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-03-21 14:48:22 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-03-21 14:48:22 -0700 |
commit | 6d78e9f59a6fac341840d23544a045853a07fef4 (patch) | |
tree | 09e6455462d4b34107791ae776e498044a2c393f /system/db | |
parent | e7b51324f2578cc9c1ef4eeababfcec14162a3e9 (diff) |
JSON decoded val for int variants are float64 - need to cast after assertion
Diffstat (limited to 'system/db')
-rw-r--r-- | system/db/cache.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |