summaryrefslogtreecommitdiff
path: root/mirrors
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-01-05 13:03:00 -0600
committerDan McGee <dan@archlinux.org>2012-01-05 13:03:00 -0600
commit6b16b9487a95118a6109a2c5119d430dc1192e80 (patch)
treea6ad637efb2cfd04bde7f241f91c693311432fb9 /mirrors
parent7b7dcfaa7c1b10d4f595a68e4136f30162930011 (diff)
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 'mirrors')
-rw-r--r--mirrors/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mirrors/utils.py b/mirrors/utils.py
index 686ec581..f05ffc77 100644
--- a/mirrors/utils.py
+++ b/mirrors/utils.py
@@ -26,7 +26,7 @@ def annotate_url(url, delays):
url.delay = None
url.score = None
-@cache_function(300)
+@cache_function(123)
def get_mirror_statuses(cutoff=default_cutoff):
cutoff_time = datetime.datetime.utcnow() - cutoff
protocols = list(MirrorProtocol.objects.filter(is_download=True))
@@ -80,7 +80,7 @@ def get_mirror_statuses(cutoff=default_cutoff):
'urls': urls,
}
-@cache_function(300)
+@cache_function(117)
def get_mirror_errors(cutoff=default_cutoff):
cutoff_time = datetime.datetime.utcnow() - cutoff
errors = MirrorLog.objects.filter(