mirror of https://github.com/borgbackup/borg.git
create --no-cache-sync-forced option
when given, force using the AdHocCache.
This commit is contained in:
parent
de342581d6
commit
98162fbb42
|
@ -225,6 +225,7 @@ class CreateMixIn:
|
|||
progress=args.progress,
|
||||
lock_wait=self.lock_wait,
|
||||
permit_adhoc_cache=args.no_cache_sync,
|
||||
force_adhoc_cache=args.no_cache_sync_forced,
|
||||
cache_mode=args.files_cache_mode,
|
||||
iec=args.iec,
|
||||
) as cache:
|
||||
|
@ -803,6 +804,12 @@ class CreateMixIn:
|
|||
action="store_true",
|
||||
help="experimental: do not synchronize the cache. Implies not using the files cache.",
|
||||
)
|
||||
subparser.add_argument(
|
||||
"--no-cache-sync-forced",
|
||||
dest="no_cache_sync_forced",
|
||||
action="store_true",
|
||||
help="experimental: do not synchronize the cache (forced). Implies not using the files cache.",
|
||||
)
|
||||
subparser.add_argument(
|
||||
"--stdin-name",
|
||||
metavar="NAME",
|
||||
|
|
|
@ -413,6 +413,7 @@ class Cache:
|
|||
progress=False,
|
||||
lock_wait=None,
|
||||
permit_adhoc_cache=False,
|
||||
force_adhoc_cache=False,
|
||||
cache_mode=FILES_CACHE_MODE_DISABLED,
|
||||
iec=False,
|
||||
):
|
||||
|
@ -431,6 +432,9 @@ class Cache:
|
|||
def adhoc():
|
||||
return AdHocCache(manifest=manifest, lock_wait=lock_wait, iec=iec)
|
||||
|
||||
if force_adhoc_cache:
|
||||
return adhoc()
|
||||
|
||||
if not permit_adhoc_cache:
|
||||
return local()
|
||||
|
||||
|
|
Loading…
Reference in New Issue