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:
parent
0c958010ac
commit
8fe4ca4038
8 changed files with 131 additions and 59 deletions
|
@ -251,6 +251,18 @@ func TestProxyStoreGet(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestProxyStoreGetWithoutScheduler(t *testing.T) {
|
||||
te := makeTestEnv(t, "foo/bar")
|
||||
te.store.scheduler = nil
|
||||
|
||||
populate(t, te, 1, 10, 1)
|
||||
|
||||
_, err := te.store.Get(te.ctx, te.inRemote[0].Digest)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProxyStoreStat(t *testing.T) {
|
||||
te := makeTestEnv(t, "foo/bar")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue