This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/data/cache/cache_key.py

9 lines
310 B
Python
Raw Normal View History

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')