8 lines
310 B
Python
8 lines
310 B
Python
from collections import namedtuple
|
|
|
|
class CacheKey(namedtuple('CacheKey', ['key', 'expiration'])):
|
|
""" Defines a key into the data model cache. """
|
|
pass
|
|
|
|
def for_repository_blob(namespace_name, repo_name, digest):
|
|
return CacheKey('repository_blob__%s_%s_%s' % (namespace_name, repo_name, digest), '60s')
|