def get_cache_duration(cache_key):
 namespace = _get_cache_key_namespace(cache_key)
 duration = settings.SHUUP_CACHE_DURATIONS.get(namespace)
 if (duration is None):
  duration = DEFAULT_CACHE_DURATIONS.get(namespace, settings.SHUUP_DEFAULT_CACHE_DURATION)
 return duration

def get_cache_duration ( cache_key ) : namespace = _get_cache_key_namespace ( cache_key ) duration = settings . SHUUP_CACHE_DURATIONS . get ( namespace ) if ( duration is None ) : duration = DEFAULT_CACHE_DURATIONS . get ( namespace , settings . SHUUP_DEFAULT_CACHE_DURATION ) return duration
determine a cache duration for the given cache key .