/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lru_cache.py

  • Committer: Michael Hudson
  • Date: 2007-11-29 18:58:23 UTC
  • mfrom: (3048 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3189.
  • Revision ID: michael.hudson@canonical.com-20071129185823-vpokl0unnsjib0xw
merge bzr.dev
a bit involved, hope i got it all right!

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
            # Trigger the cleanup
70
70
            self.cleanup()
71
71
 
 
72
    def get(self, key, default=None):
 
73
        if key in self._cache:
 
74
            return self[key]
 
75
        return default
 
76
 
72
77
    def cleanup(self):
73
78
        """Clear the cache until it shrinks to the requested size.
74
79