コード例 #1
0
ファイル: urls.py プロジェクト: ericheroster/catonmat.net
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)
コード例 #2
0
ファイル: urls.py プロジェクト: ericheroster/catonmat.net
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)
コード例 #3
0
ファイル: utils.py プロジェクト: gobburms/catonmat.net
def cached_template_response(computef, cache_key, duration, *args, **kw):
    return template_response(from_cache_or_compute(computef, cache_key, duration, *args, **kw))