Example #1
0
def find_redirect(request_path):
    request_path = agreed_path(request_path)
    cache_key = 'redirect_%s' % request_path
    return from_cache_or_compute(find_redirect_compute, cache_key, 3600, request_path)
Example #2
0
def find_url_map(request_path):
    request_path = agreed_path(request_path)
    cache_key = 'not_found_%s' % request_path
    return from_cache_or_compute(find_url_map_compute, cache_key, 3600, request_path)
Example #3
0
def cached_template_response(computef, cache_key, duration, *args, **kw):
    return template_response(from_cache_or_compute(computef, cache_key, duration, *args, **kw))