Invalidate the blob store descriptor caches when content is removed from from
the proxy. Also, switch to reference in the scheduler API. Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
This commit is contained in:
parent
a7740f5d0f
commit
3e570e59f1
7 changed files with 152 additions and 62 deletions
|
@ -62,11 +62,17 @@ func (pms proxyManifestStore) Get(ctx context.Context, dgst digest.Digest, optio
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// Schedule the repo for removal
|
||||
pms.scheduler.AddManifest(pms.repositoryName, repositoryTTL)
|
||||
// Schedule the manifest blob for removal
|
||||
repoBlob, err := reference.WithDigest(pms.repositoryName, dgst)
|
||||
if err != nil {
|
||||
context.GetLogger(ctx).Errorf("Error creating reference: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
pms.scheduler.AddManifest(repoBlob, repositoryTTL)
|
||||
// Ensure the manifest blob is cleaned up
|
||||
pms.scheduler.AddBlob(dgst, repositoryTTL)
|
||||
//pms.scheduler.AddBlob(blobRef, repositoryTTL)
|
||||
|
||||
}
|
||||
|
||||
return manifest, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue