From e7b51324f2578cc9c1ef4eeababfcec14162a3e9 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 21 Mar 2017 14:17:34 -0700 Subject: adding cache-control age and disabler --- system/admin/config/config.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'system/admin') diff --git a/system/admin/config/config.go b/system/admin/config/config.go index d623592..015c081 100644 --- a/system/admin/config/config.go +++ b/system/admin/config/config.go @@ -18,6 +18,8 @@ type Config struct { Etag string `json:"etag"` DisableCORS bool `json:"cors_disabled"` DisableGZIP bool `json:"gzip_disabled"` + DisableHTTPCache bool `json:"cache_disabled"` + CacheMaxAge int64 `json:"cache_max_age"` CacheInvalidate []string `json:"cache"` BackupBasicAuthUser string `json:"backup_basic_auth_user"` BackupBasicAuthPassword string `json:"backup_basic_auth_password"` @@ -99,6 +101,19 @@ func (c *Config) MarshalEditor() ([]byte, error) { "true": "Disable GZIP", }), }, + editor.Field{ + View: editor.Checkbox("DisableHTTPCache", c, map[string]string{ + "label": "Disable HTTP Cache (overrides 'Cache-Control' header)", + }, map[string]string{ + "true": "Disable HTTP Cache", + }), + }, + editor.Field{ + View: editor.Input("CacheMaxAge", c, map[string]string{ + "label": "Max-Age value for HTTP caching (in seconds, 0 = 2592000)", + "type": "text", + }), + }, editor.Field{ View: editor.Checkbox("CacheInvalidate", c, map[string]string{ "label": "Invalidate cache on save", -- cgit v1.2.3