summaryrefslogtreecommitdiffstats
path: root/packages/views
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-01-05 20:03:00 +0100
committerDan McGee <dan@archlinux.org>2012-01-05 20:03:00 +0100
commit6b16b9487a95118a6109a2c5119d430dc1192e80 (patch)
treea6ad637efb2cfd04bde7f241f91c693311432fb9 /packages/views
parent7b7dcfaa7c1b10d4f595a68e4136f30162930011 (diff)
downloadarchweb-6b16b9487a95118a6109a2c5119d430dc1192e80.tar.gz
archweb-6b16b9487a95118a6109a2c5119d430dc1192e80.tar.xz
Adjust page and content caching lengths and decorators
Remove never_cache from many places now that we don't actually need it since we aren't caching by default. Adjust our cache_function decorator times be shorter values, and also randomize them a bit to make cache invalidations not all line up. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/views')
-rw-r--r--packages/views/__init__.py2
-rw-r--r--packages/views/signoff.py2
2 files changed, 0 insertions, 4 deletions
diff --git a/packages/views/__init__.py b/packages/views/__init__.py
index 9f24056..5be4833 100644
--- a/packages/views/__init__.py
+++ b/packages/views/__init__.py
@@ -5,7 +5,6 @@ from django.core.serializers.json import DjangoJSONEncoder
from django.http import HttpResponse, Http404
from django.shortcuts import get_object_or_404, redirect
from django.utils import simplejson
-from django.views.decorators.cache import never_cache
from django.views.decorators.http import require_POST
from django.views.decorators.vary import vary_on_headers
from django.views.generic.simple import direct_to_template
@@ -247,7 +246,6 @@ def arch_differences(request):
return direct_to_template(request, 'packages/differences.html', context)
@permission_required('main.change_package')
-@never_cache
def stale_relations(request):
relations = PackageRelation.objects.select_related('user')
pkgbases = Package.objects.all().values('pkgbase')
diff --git a/packages/views/signoff.py b/packages/views/signoff.py
index e57b4d9..e3daf0d 100644
--- a/packages/views/signoff.py
+++ b/packages/views/signoff.py
@@ -18,7 +18,6 @@ from ..utils import (get_signoff_groups, approved_by_signoffs,
PackageSignoffGroup)
@permission_required('main.change_package')
-@never_cache
def signoffs(request):
signoff_groups = sorted(get_signoff_groups(), key=attrgetter('pkgbase'))
for group in signoff_groups:
@@ -178,7 +177,6 @@ class SignoffJSONEncoder(DjangoJSONEncoder):
return super(SignoffJSONEncoder, self).default(obj)
@permission_required('main.change_package')
-@never_cache
def signoffs_json(request):
signoff_groups = sorted(get_signoff_groups(), key=attrgetter('pkgbase'))
data = {