~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lru_cache.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-28 20:20:57 UTC
  • mfrom: (3763.8.17 btree_buffer)
  • Revision ID: pqm@pqm.ubuntu.com-20081028202057-u3csau9zvf0hapya
(jam) BTreeIndex will now prefetch nearby pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
            return self[key]
75
75
        return default
76
76
 
 
77
    def keys(self):
 
78
        """Get the list of keys currently cached.
 
79
 
 
80
        Note that values returned here may not be available by the time you
 
81
        request them later. This is simply meant as a peak into the current
 
82
        state.
 
83
 
 
84
        :return: An unordered list of keys that are currently cached.
 
85
        """
 
86
        return self._cache.keys()
 
87
 
77
88
    def cleanup(self):
78
89
        """Clear the cache until it shrinks to the requested size.
79
90