~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Martin Packman
  • Date: 2011-10-14 19:24:19 UTC
  • mto: This revision was merged to the branch mainline in revision 6235.
  • Revision ID: martin.packman@canonical.com-20111014192419-2346nl9drsx4018i
Stop going through LRUCache.add for some cache stores in chk_map

Show diffs side-by-side

added added

removed removed

Lines of Context:
920
920
        bytes = ''.join(lines)
921
921
        if len(bytes) != self._current_size():
922
922
            raise AssertionError('Invalid _current_size')
923
 
        _get_cache().add(self._key, bytes)
 
923
        _get_cache()[self._key] = bytes
924
924
        return [self._key]
925
925
 
926
926
    def refs(self):
1193
1193
                    prefix, node_key_filter = keys[record.key]
1194
1194
                    node_and_filters.append((node, node_key_filter))
1195
1195
                    self._items[prefix] = node
1196
 
                    _get_cache().add(record.key, bytes)
 
1196
                    _get_cache()[record.key] = bytes
1197
1197
                for info in node_and_filters:
1198
1198
                    yield info
1199
1199
 
1319
1319
            lines.append(serialised[prefix_len:])
1320
1320
        sha1, _, _ = store.add_lines((None,), (), lines)
1321
1321
        self._key = StaticTuple("sha1:" + sha1,).intern()
1322
 
        _get_cache().add(self._key, ''.join(lines))
 
1322
        _get_cache()[self._key] = ''.join(lines)
1323
1323
        yield self._key
1324
1324
 
1325
1325
    def _search_key(self, key):