Reimplement cache support for blobs in the registry data model

This commit is contained in:
Joseph Schorr 2018-10-04 16:09:56 -04:00
parent 7a68c41f1c
commit a172de4fdc
7 changed files with 109 additions and 16 deletions

View file

@ -7,7 +7,7 @@ class CacheKey(namedtuple('CacheKey', ['key', 'expiration'])):
def for_repository_blob(namespace_name, repo_name, digest):
""" Returns a cache key for a blob in a repository. """
return CacheKey('repository_blob__%s_%s_%s' % (namespace_name, repo_name, digest), '60s')
return CacheKey('repo_blob__%s_%s_%s' % (namespace_name, repo_name, digest), '60s')
def for_catalog_page(auth_context_key, start_id, limit):