fix: use slowpages to cache doc/active (#5781)
This commit is contained in:
parent
0c3ff8be59
commit
0864b73aab
ietf
|
@ -846,11 +846,12 @@ def index_all_drafts(request):
|
|||
return render(request, 'doc/index_all_drafts.html', { "categories": categories })
|
||||
|
||||
def index_active_drafts(request):
|
||||
slowcache = caches['slowpages']
|
||||
cache_key = 'doc:index_active_drafts'
|
||||
groups = cache.get(cache_key)
|
||||
groups = slowcache.get(cache_key)
|
||||
if not groups:
|
||||
groups = active_drafts_index_by_group()
|
||||
cache.set(cache_key, groups, 15*60)
|
||||
slowcache.set(cache_key, groups, 15*60)
|
||||
return render(request, "doc/index_active_drafts.html", { 'groups': groups })
|
||||
|
||||
def ajax_select2_search_docs(request, model_name, doc_type):
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% load cache %}
|
||||
{% block title %}Active Internet-Drafts{% endblock %}
|
||||
{% block content %}
|
||||
{% cache 900 ietf_doc_index_active_drafts %}
|
||||
{% cache 900 ietf_doc_index_active_drafts using="slowpages" %}
|
||||
{% origin %}
|
||||
<h1>Active Internet-Drafts</h1>
|
||||
<p>
|
||||
|
|
Loading…
Reference in a new issue