Merge pull request #3880 from wzshiming/proxy-cache-configurable

This commit is contained in:
Milos Gajdos 2023-07-14 08:43:19 +01:00 committed by GitHub
commit 69023c7f85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 131 additions and 59 deletions

View file

@ -669,6 +669,11 @@ type Proxy struct {
// Password of the hub user
Password string `yaml:"password"`
// TTL is the expiry time of the content and will be cleaned up when it expires
// if not set, defaults to 7 * 24 hours
// If set to zero, will never expire cache
TTL *time.Duration `yaml:"ttl,omitempty"`
}
// Parse parses an input configuration yaml document into a Configuration struct