From 4bb7f4496d15115ce7d752fb0f44b018629d04ca Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 6 Sep 2007 17:00:37 +0000 Subject: [PATCH] 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 --- pym/portage_dep.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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 -- 2.26.2