adds config option to define where the cache files should be stored #254

This commit is contained in:
ricardo.bartels@telekom.de
2022-11-24 23:12:06 +01:00
parent 9953a8f3a7
commit c1b9ec071d
2 changed files with 5 additions and 1 deletions

View File

@@ -49,6 +49,7 @@ class NetBoxHandler:
"timeout": 30,
"max_retry_attempts": 4,
"use_caching": True,
"cache_directory_location": "cache",
"ignore_unknown_source_object_pruning": False
}
@@ -126,7 +127,7 @@ class NetBoxHandler:
if self.use_caching is False:
return
cache_folder_name = "cache"
cache_folder_name = self.cache_directory_location
base_dir = os.sep.join(__file__.split(os.sep)[0:-3])
if cache_folder_name[0] != os.sep:

View File

@@ -102,6 +102,9 @@ host_fqdn = netbox.example.com
# dependencies occur, switching off caching might help.
#use_caching = true
# The location of the directory where the cache files should be stored
#cache_directory_location = cache
###
### [sources/*]
###