From 3967598fc3861fdc0d7498cf618dce242e20b153 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 2 Dec 2021 10:17:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=85=8D=E7=BD=AE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=98=AF=E5=90=A6=E6=94=AF=E6=8C=81Cache-Control:=20m?= =?UTF-8?q?ax-age=3D...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/http_cache_config.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/serverconfigs/http_cache_config.go b/pkg/serverconfigs/http_cache_config.go index 7292720..13bae02 100644 --- a/pkg/serverconfigs/http_cache_config.go +++ b/pkg/serverconfigs/http_cache_config.go @@ -9,10 +9,12 @@ type HTTPCacheConfig struct { IsPrior bool `yaml:"isPrior" json:"isPrior"` IsOn bool `yaml:"isOn" json:"isOn"` - AddStatusHeader bool `yaml:"addStatusHeader" json:"addStatusHeader"` // 是否增加命中状态Header(X-Cache) - AddAgeHeader bool `yaml:"addAgeHeader" json:"addAgeHeader"` // 是否增加Age Header - PurgeIsOn bool `yaml:"purgeIsOn" json:"purgeIsOn"` // 是否允许使用Purge方法清理 - PurgeKey string `yaml:"purgeKey" json:"purgeKey"` // Purge时使用的X-Edge-Purge-Key + AddStatusHeader bool `yaml:"addStatusHeader" json:"addStatusHeader"` // 是否增加命中状态Header(X-Cache) + AddAgeHeader bool `yaml:"addAgeHeader" json:"addAgeHeader"` // 是否增加Age Header + EnableCacheControlMaxAge bool `yaml:"enableCacheControlMaxAge" json:"enableCacheControlMaxAge"` // 是否支持Cache-Control: max-age=... + + PurgeIsOn bool `yaml:"purgeIsOn" json:"purgeIsOn"` // 是否允许使用Purge方法清理 + PurgeKey string `yaml:"purgeKey" json:"purgeKey"` // Purge时使用的X-Edge-Purge-Key CacheRefs []*HTTPCacheRef `yaml:"cacheRefs" json:"cacheRefs"` // 缓存配置 }