9 lines
309 B
Python
9 lines
309 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')
|