Browse Source

Merge pull request #6626 from ThomasWaldmann/issue-5673-1.1

do not load files cache for commands not using it, fixes #5673
TW 3 years ago
parent
commit
6804d2c017
2 changed files with 2 additions and 5 deletions
  1. 2 2
      src/borg/constants.py
  2. 0 3
      src/borg/helpers.py

+ 2 - 2
src/borg/constants.py

@@ -72,8 +72,8 @@ CHUNKER_PARAMS = (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE
 ITEMS_CHUNKER_PARAMS = (15, 19, 17, HASH_WINDOW_SIZE)
 
 # operating mode of the files cache (for fast skipping of unchanged files)
-DEFAULT_FILES_CACHE_MODE_UI = 'ctime,size,inode'
-DEFAULT_FILES_CACHE_MODE = 'cis'  # == CacheMode(DEFAULT_FILES_CACHE_MODE_UI)
+DEFAULT_FILES_CACHE_MODE_UI = 'ctime,size,inode'  # default for "borg create" command (CLI UI)
+DEFAULT_FILES_CACHE_MODE = 'd'  # most borg commands do not use the files cache at all (disable)
 
 # return codes returned by borg command
 # when borg is killed by signal N, rc = 128 + N

+ 0 - 3
src/borg/helpers.py

@@ -667,9 +667,6 @@ def FilesCacheMode(s):
     return mode
 
 
-assert FilesCacheMode(DEFAULT_FILES_CACHE_MODE_UI) == DEFAULT_FILES_CACHE_MODE  # keep these 2 values in sync!
-
-
 def dir_is_cachedir(path):
     """Determines whether the specified path is a cache directory (and
     therefore should potentially be excluded from the backup) according to