Remove cache_function decorator from a few spots

The benefit of these storage operations might be outweighed by the cost,
especially given how infrequently these functions are called.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2013-04-14 13:21:16 -05:00
parent 213aa3a2fa
commit f357a39a49
2 changed files with 1 additions and 6 deletions

View File

@ -10,7 +10,7 @@
from django.utils.timezone import now
from .fields import PositiveBigIntegerField
from .utils import cache_function, set_created_field
from .utils import set_created_field
from devel.models import DeveloperKey
from packages.alpm import AlpmAPI
@ -187,7 +187,6 @@ def applicable_arches(self):
self._applicable_arches = list(arches)
return self._applicable_arches
#@cache_function(119)
def get_requiredby(self):
"""
Returns a list of package objects. An attempt will be made to keep this
@ -265,7 +264,6 @@ def get_requiredby(self):
trimmed.append(dep)
return trimmed
#@cache_function(121)
def get_depends(self):
"""
Returns a list of dicts. Each dict contains ('dep', 'pkg', and
@ -293,7 +291,6 @@ def sort_key(val):
return (sort_order.get(dep.deptype, 1000), dep.name)
return sorted(deps, key=sort_key)
#@cache_function(123)
def reverse_conflicts(self):
"""
Returns a list of packages with conflicts against this package.

View File

@ -111,7 +111,6 @@ def annotate_url(url, url_data):
url.score = (hours + url.duration_avg + stddev) / divisor
@cache_function(123)
def get_mirror_statuses(cutoff=DEFAULT_CUTOFF, mirror_id=None):
cutoff_time = now() - cutoff
@ -155,7 +154,6 @@ def get_mirror_statuses(cutoff=DEFAULT_CUTOFF, mirror_id=None):
}
@cache_function(117)
def get_mirror_errors(cutoff=DEFAULT_CUTOFF, mirror_id=None):
cutoff_time = now() - cutoff
errors = MirrorLog.objects.filter(