From 6b16b9487a95118a6109a2c5119d430dc1192e80 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 5 Jan 2012 13:03:00 -0600 Subject: 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 --- mirrors/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mirrors') diff --git a/mirrors/utils.py b/mirrors/utils.py index 686ec58..f05ffc7 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( -- cgit v1.2.3-24-g4f1b