~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lru_cache.py

  • Committer: Robert J. Tanner
  • Date: 2009-04-29 05:53:21 UTC
  • mfrom: (4311 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4312.
  • Revision ID: tanner@real-time.com-20090429055321-v2s5l1mgki9f6cgn
[merge] 1.14 back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
235
235
        if self._last_recently_used is None:
236
236
            self._most_recently_used = None
237
237
        node.run_cleanup()
 
238
        # Now remove this node from the linked list
 
239
        if node.prev is not None:
 
240
            node.prev.next = node.next
 
241
        if node.next is not None:
 
242
            node.next.prev = node.prev
 
243
        # And remove this node's pointers
 
244
        node.prev = None
 
245
        node.next = None
238
246
 
239
247
    def _remove_lru(self):
240
248
        """Remove one entry from the lru, and handle consequences.