~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/meta_store.py

  • Committer: Robert Collins
  • Date: 2005-09-27 07:24:40 UTC
  • mfrom: (1185.1.41)
  • Revision ID: robertc@robertcollins.net-20050927072440-1bf4d99c3e1db5b3
pair programming worx... merge integration and weave

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 trace import mutter
 
17
from bzrlib.trace import mutter
18
18
from bzrlib.store import ImmutableStore
19
19
 
 
20
 
20
21
class CachedStore:
21
22
    """A store that caches data locally, to avoid repeated downloads.
22
23
    The precacache method should be used to avoid server round-trips for
36
37
        """Copy a series of ids into the cache, before they are used.
37
38
        For remote stores that support pipelining or async downloads, this can
38
39
        increase speed considerably.
 
40
 
 
41
        Failures while prefetching are ignored.
39
42
        """
40
43
        mutter("Prefetch of ids %s" % ",".join(ids))
41
 
        self.cache_store.copy_multi(self.source_store, ids)
 
44
        self.cache_store.copy_multi(self.source_store, ids, 
 
45
                                    permit_failure=True)