File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -544,8 +544,11 @@ def index_all_drafts(request):
544544 return render (request , 'doc/index_all_drafts.html' , { "categories" : categories })
545545
546546def index_active_drafts (request ):
547- groups = active_drafts_index_by_group ()
548-
547+ cache_key = 'doc:index_active_drafts'
548+ groups = cache .get (cache_key )
549+ if not groups :
550+ groups = active_drafts_index_by_group ()
551+ cache .set (cache_key , groups , 15 * 60 )
549552 return render (request , "doc/index_active_drafts.html" , { 'groups' : groups })
550553
551554def ajax_select2_search_docs (request , model_name , doc_type ):
Original file line number Diff line number Diff line change 22{# Copyright The IETF Trust 2015, All Rights Reserved #}
33{% load origin %}
44{% load static %}
5+ {% load cache %}
56{% block title %}Active Internet-Drafts{% endblock %}
67
78{% block content %}
9+ {% cache 900 ietf_doc_index_active_drafts %}
810 {% origin %}
911 < h1 > Active Internet-Drafts</ h1 >
1012
@@ -35,5 +37,5 @@ <h2 class="anchor-target" id="{{ group.acronym }}">{{ group.name }} ({{ group.ac
3537 </ p >
3638 {% endfor %}
3739 {% endfor %}
38-
40+ {% endcache %}
3941{% endblock %}
You can’t perform that action at this time.
0 commit comments