~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/meta_store.py

  • Committer: Martin Pool
  • Date: 2005-09-22 12:12:53 UTC
  • Revision ID: mbp@sourcefrog.net-20050922121253-eae2a3240ea5e493
- upgrade can no longer be done in current version branches
  so don't test it

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from bzrlib.trace import mutter
 
17
from trace import mutter
18
18
from bzrlib.store import ImmutableStore
19
19
 
20
 
 
21
20
class CachedStore:
22
21
    """A store that caches data locally, to avoid repeated downloads.
23
22
    The precacache method should be used to avoid server round-trips for
37
36
        """Copy a series of ids into the cache, before they are used.
38
37
        For remote stores that support pipelining or async downloads, this can
39
38
        increase speed considerably.
40
 
 
41
 
        Failures while prefetching are ignored.
42
39
        """
43
40
        mutter("Prefetch of ids %s" % ",".join(ids))
44
 
        self.cache_store.copy_multi(self.source_store, ids, 
45
 
                                    permit_failure=True)
 
41
        self.cache_store.copy_multi(self.source_store, ids)