diff options
author | Dan McGee <dan@archlinux.org> | 2012-01-05 20:03:00 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-01-05 20:03:00 +0100 |
commit | 6b16b9487a95118a6109a2c5119d430dc1192e80 (patch) | |
tree | a6ad637efb2cfd04bde7f241f91c693311432fb9 /mirrors | |
parent | 7b7dcfaa7c1b10d4f595a68e4136f30162930011 (diff) | |
download | archweb-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 'mirrors')
-rw-r--r-- | mirrors/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
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( |