实现修改缓存配置

This commit is contained in:
刘祥超
2020-09-20 16:28:07 +08:00
parent bbc21b1cd2
commit 089b30e095
6 changed files with 109 additions and 19 deletions

View File

@@ -63,3 +63,13 @@ func (this *HTTPCachePolicyDAO) FindHTTPCachePolicyName(id int64) (string, error
Result("name").
FindStringCol("")
}
// 查找所有可用的缓存策略
func (this *HTTPCachePolicyDAO) FindAllEnabledCachePolicies() (result []*HTTPCachePolicy, err error) {
_, err = this.Query().
State(HTTPCachePolicyStateEnabled).
DescPk().
Slice(&result).
FindAll()
return
}