diff --git a/ietf/doc/views_search.py b/ietf/doc/views_search.py index 3bf12a4d9..9406912f7 100644 --- a/ietf/doc/views_search.py +++ b/ietf/doc/views_search.py @@ -544,8 +544,11 @@ def index_all_drafts(request): return render(request, 'doc/index_all_drafts.html', { "categories": categories }) def index_active_drafts(request): - groups = active_drafts_index_by_group() - + cache_key = 'doc:index_active_drafts' + groups = cache.get(cache_key) + if not groups: + groups = active_drafts_index_by_group() + cache.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): diff --git a/ietf/templates/doc/index_active_drafts.html b/ietf/templates/doc/index_active_drafts.html index e9a02f885..924b95174 100644 --- a/ietf/templates/doc/index_active_drafts.html +++ b/ietf/templates/doc/index_active_drafts.html @@ -2,9 +2,11 @@ {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} {% load static %} +{% load cache %} {% block title %}Active Internet-Drafts{% endblock %} {% block content %} + {% cache 900 ietf_doc_index_active_drafts %} {% origin %}