def cached_download(self, store_path, local_path, clobber=False, backup_suffix=None, show_info=False):
    '''
    Same as download(), but uses cached copy if appropriate.
    '''
    if not self.file_cache:
      return self.download(store_path, local_path, clobber=clobber, backup_suffix=backup_suffix, show_info=show_info)

    if not clobber and os.path.exists(local_path):
      raise FileExists("download aborted: file exists: %s" % local_path)
    (cache_path, fp) = self.cache(store_path, show_info=show_info)
    if not cache_path:
      return self.download(store_path, local_path, clobber=clobber, backup_suffix=backup_suffix, show_info=show_info)

    # Item is cachable and in cache, so copy it
    if show_info:
      log_fn = log.info
    else:
      log_fn = log.debug

    log_fn("copying from cache: %s from %s", local_path, cache_path)
    # TODO may not want to copy large files, as this doubles disk I/O; maybe
    # add option to move file and purge from cache (this would make diff costly
    # later, of course)
    # TODO download does check MD5, but we should also verify MD5 post-copy from cache
    copyfile_atomic(cache_path, local_path, make_parents=True, backup_suffix=backup_suffix)
    return fp
dataset/ETHPy150Open bloomreach/zinc/zinc.py/Store.cached_download/original