Add ability for specific geographic regions to be blocked from pulling images within a namespace
This commit is contained in:
parent
c71a43a06c
commit
c3710a6a5e
20 changed files with 257 additions and 37 deletions
5
data/cache/cache_key.py
vendored
5
data/cache/cache_key.py
vendored
|
@ -14,3 +14,8 @@ def for_catalog_page(auth_context_key, start_id, limit):
|
|||
""" Returns a cache key for a single page of a catalog lookup for an authed context. """
|
||||
params = (auth_context_key or '(anon)', start_id or 0, limit or 0)
|
||||
return CacheKey('catalog_page__%s_%s_%s' % params, '60s')
|
||||
|
||||
|
||||
def for_namespace_geo_restrictions(namespace_name):
|
||||
""" Returns a cache key for the geo restrictions for a namespace """
|
||||
return CacheKey('geo_restrictions__%s' % (namespace_name), '240s')
|
||||
|
|
Reference in a new issue