mirror of
https://github.com/distribution/distribution.git
synced 2025-09-04 08:25:41 +00:00
Option to configure proxy cache TTL
Currently when registry is run as proxy it tries to cleanup unused blobs from its cache after 7 days which is hard-coded. This PR makes that value configurable. Co-authored-by: Shiming Zhang <wzshiming@foxmail.com> Co-authored-by: Manish Tomar <manish.tomar@docker.com> Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
committed by
Shiming Zhang
parent
0c958010ac
commit
8fe4ca4038
@@ -655,6 +655,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
|
||||
|
Reference in New Issue
Block a user