mirror of
https://github.com/Kozea/Radicale.git
synced 2025-04-04 05:37:37 +03:00
default for filesystem_cache_folder is filesystem_folder
This commit is contained in:
parent
b3d0c16407
commit
2bb2d6385b
4 changed files with 7 additions and 4 deletions
|
@ -1009,7 +1009,7 @@ Default: `/var/lib/radicale/collections`
|
|||
|
||||
Folder for storing cache of local collections, created if not present
|
||||
|
||||
Default_ `/var/lib/radicale/collections`
|
||||
Default: (filesystem_folder)
|
||||
|
||||
Note: only used in case of use_cache_subfolder_* options are active
|
||||
|
||||
|
|
2
config
2
config
|
@ -141,7 +141,7 @@
|
|||
# Folder for storing cache of local collections, created if not present
|
||||
# Note: only used in case of use_cache_subfolder_* options are active
|
||||
# Note: can be used on multi-instance setup to cache files on local node (see below)
|
||||
#filesystem_cache_folder = /var/lib/radicale/collections
|
||||
#filesystem_cache_folder = (filesystem_folder)
|
||||
|
||||
# Use subfolder 'collection-cache' for 'item' cache file structure instead of inside collection folder
|
||||
# Note: can be used on multi-instance setup to cache 'item' on local node
|
||||
|
|
|
@ -280,7 +280,7 @@ DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([
|
|||
"help": "path where collections are stored",
|
||||
"type": filepath}),
|
||||
("filesystem_cache_folder", {
|
||||
"value": "/var/lib/radicale/collections",
|
||||
"value": "",
|
||||
"help": "path where cache of collections is stored in case of use_cache_subfolder_* options are active",
|
||||
"type": filepath}),
|
||||
("use_cache_subfolder_for_item", {
|
||||
|
|
|
@ -98,7 +98,10 @@ class StorageBase(storage.BaseStorage):
|
|||
return os.path.join(self._filesystem_folder, "collection-root")
|
||||
|
||||
def _get_collection_cache_folder(self) -> str:
|
||||
return os.path.join(self._filesystem_cache_folder, "collection-cache")
|
||||
if self._filesystem_cache_folder:
|
||||
return os.path.join(self._filesystem_cache_folder, "collection-cache")
|
||||
else:
|
||||
return os.path.join(self._filesystem_folder, "collection-cache")
|
||||
|
||||
def _get_collection_cache_subfolder(self, path, folder, subfolder) -> str:
|
||||
if (self._use_cache_subfolder_for_item is True) and (subfolder == "item"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue