From 7f462b330b379bc127883f48376514b5b7941ef7 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 31 Jan 2018 18:02:54 +0000 Subject: [PATCH] Added view caching of the non-wg list index. - Legacy-Id: 14601 --- ietf/mailinglists/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ietf/mailinglists/views.py b/ietf/mailinglists/views.py index 0399565c6..d26fbccf9 100644 --- a/ietf/mailinglists/views.py +++ b/ietf/mailinglists/views.py @@ -3,6 +3,7 @@ import re from django.shortcuts import render +from django.views.decorators.cache import cache_page import debug # pyflakes:ignore @@ -14,6 +15,9 @@ def groups(request): return render(request, "mailinglists/group_archives.html", { "groups": groups } ) +# we run the import_mailman_listinfo command via cron once per hour; we can +# safely cache this for some time. +@cache_page(15*60) def nonwg(request): groups = Group.objects.filter(type__in=("wg", "rg")).order_by("acronym")