feat: set cache_expiration for each storage (close #1455)

This commit is contained in:
Noah Hsu
2022-08-07 13:33:53 +08:00
parent 5b40254e3b
commit 2e8322e99b
4 changed files with 30 additions and 22 deletions

View File

@ -69,6 +69,15 @@ func getMainItems(config driver.Config) []driver.Item {
Name: "down_proxy_url",
Type: conf.TypeText,
}}
if !config.NoCache {
items = append(items, driver.Item{
Name: "cache_expiration",
Type: conf.TypeNumber,
Default: "30",
Required: true,
Help: "The cache expiration time for this storage",
})
}
if !config.OnlyProxy && !config.OnlyLocal {
items = append(items, []driver.Item{{
Name: "web_proxy",