Added view caching of the non-wg list index.
- Legacy-Id: 14601
This commit is contained in:
parent
0ac80ab1ee
commit
7f462b330b
|
@ -3,6 +3,7 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
from django.views.decorators.cache import cache_page
|
||||||
|
|
||||||
import debug # pyflakes:ignore
|
import debug # pyflakes:ignore
|
||||||
|
|
||||||
|
@ -14,6 +15,9 @@ def groups(request):
|
||||||
|
|
||||||
return render(request, "mailinglists/group_archives.html", { "groups": groups } )
|
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):
|
def nonwg(request):
|
||||||
groups = Group.objects.filter(type__in=("wg", "rg")).order_by("acronym")
|
groups = Group.objects.filter(type__in=("wg", "rg")).order_by("acronym")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue