summaryrefslogtreecommitdiffstats
path: root/main
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 /main
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 'main')
-rw-r--r--main/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/models.py b/main/models.py
index c54e297..d72f2c0 100644
--- a/main/models.py
+++ b/main/models.py
@@ -201,14 +201,14 @@ class Package(models.Model):
def maintainers(self, maintainers):
self._maintainers = maintainers
- @cache_function(300)
+ @cache_function(1800)
def applicable_arches(self):
'''The list of (this arch) + (available agnostic arches).'''
arches = set(Arch.objects.filter(agnostic=True))
arches.add(self.arch)
return list(arches)
- @cache_function(300)
+ @cache_function(119)
def get_requiredby(self):
"""
Returns a list of package objects. An attempt will be made to keep this
@@ -254,7 +254,7 @@ class Package(models.Model):
trimmed.append(dep)
return trimmed
- @cache_function(300)
+ @cache_function(121)
def get_depends(self):
"""
Returns a list of dicts. Each dict contains ('dep', 'pkg', and
@@ -279,7 +279,7 @@ class Package(models.Model):
deps.append({'dep': dep, 'pkg': pkg, 'providers': providers})
return deps
- @cache_function(300)
+ @cache_function(125)
def base_package(self):
"""
Locate the base package for this package. It may be this very package,