mirror of
https://github.com/restic/restic.git
synced 2025-10-29 11:19:06 +00:00
cache: Synchronize downloading
This commit adds code to synchronize downloading files to the cache. Before, requests that came in for files currently downloading would fail because the file was not completed in the cache. Now, the code waits until the download is completed. Closes #1278
This commit is contained in:
5
internal/cache/cache.go
vendored
5
internal/cache/cache.go
vendored
@@ -155,10 +155,7 @@ func (c *Cache) IsNotExist(err error) bool {
|
||||
|
||||
// Wrap returns a backend with a cache.
|
||||
func (c *Cache) Wrap(be restic.Backend) restic.Backend {
|
||||
return &Backend{
|
||||
Backend: be,
|
||||
Cache: c,
|
||||
}
|
||||
return newBackend(be, c)
|
||||
}
|
||||
|
||||
// BaseDir returns the base directory.
|
||||
|
||||
Reference in New Issue
Block a user