From: Zac Medico Date: Thu, 6 Sep 2007 17:00:37 +0000 (-0000) Subject: Don't cache results from match_from_list() since *dbapi.match() caches do the job... X-Git-Tag: v2.1.3.9~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4bb7f4496d15115ce7d752fb0f44b018629d04ca;p=portage.git Don't cache results from match_from_list() since *dbapi.match() caches do the job. (trunk r7694) svn path=/main/branches/2.1.2/; revision=7730 --- diff --git a/pym/portage_dep.py b/pym/portage_dep.py index a8007857e..c00da1163 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -543,8 +543,6 @@ def best_match_to_list(mypkg, mylist): bestm = x return bestm -_match_from_list_cache = {} - def match_from_list(mydep, candidate_list): """ Searches list for entries that matches the package. @@ -557,12 +555,6 @@ def match_from_list(mydep, candidate_list): @return: A list of package atoms that match the given package atom """ - global _match_from_list_cache - cache_key = (mydep, tuple(candidate_list)) - mylist = _match_from_list_cache.get(cache_key, None) - if mylist is not None: - return mylist[:] - from portage_util import writemsg if mydep[0] == "!": mydep = mydep[1:] @@ -666,5 +658,4 @@ def match_from_list(mydep, candidate_list): continue mylist.append(x) - _match_from_list_cache[cache_key] = mylist - return mylist[:] + return mylist