Don't cache results from match_from_list() since *dbapi.match() caches do the job.
authorZac Medico <zmedico@gentoo.org>
Fri, 24 Aug 2007 21:57:28 +0000 (21:57 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 24 Aug 2007 21:57:28 +0000 (21:57 -0000)
svn path=/main/trunk/; revision=7694

pym/portage/dep.py

index fec15332f5ee1f58da99c5fc9b9015d30f3a5907..da0bb64279556cf94fca9efe1de4cc0c8e0e6337 100644 (file)
@@ -629,8 +629,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.
@@ -643,12 +641,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:]
@@ -752,5 +744,4 @@ def match_from_list(mydep, candidate_list):
                                continue
                        mylist.append(x)
 
-       _match_from_list_cache[cache_key] = mylist
-       return mylist[:]
+       return mylist