From 06e8cc4e21b5f28b5d95cdb89bb2d45f549b0b12 Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sun, 16 Mar 2025 06:49:33 +0100 Subject: [PATCH] update --- Collection-Storage.md | 46 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/Collection-Storage.md b/Collection-Storage.md index c456cce..fe8cc02 100644 --- a/Collection-Storage.md +++ b/Collection-Storage.md @@ -93,10 +93,40 @@ jq . .Radicale.props 1:1 reflecting items in a pre-compiled format -Since 3.3.2 the item cache can be located outside by option `[storage] use_cache_subfolder_for_item = True` +Since 3.3.2 the item cache can be located outside by option `[storage] use_cache_subfolder_for_item = True` in combination with defined `filesystem_cache_folder`. Since 3.3.2 the item cache format can be toggled between SHA-256 or using mtime+size of original item by option `[storage] use_mtime_and_size_for_item_cache = True` (recommend to use only on systems where mtime has "ns" granularity) +#### Directory: .Radicale.cache/history + +historic pre-compiled items + +Since 3.3.2 the history can be located outside by option `[storage] use_cache_subfolder_for_history = True` in combination with defined `filesystem_cache_folder`. + +#### Directory: .Radicale.cache/sync-token + +file containing synchronization tokens related to each client serve only changes on request + +Since 3.3.2 the sync-token can be located outside by option `[storage] use_cache_subfolder_for_synctoken = True` in combination with defined `filesystem_cache_folder`. + +## Cache Folder + +Since 3.3.2 there is the option to store the cache outside the `filesystem_folder` e.g. `[storage] filesystem_cache_folder = /var/cache/radicale/collections/collection-cache` + +This can be used storing item cache local on the system while the items, sync-token and history are stored in shared filesystem like NFS or GlusterFS. + +| Item Storage | Item Cache | History | Sync-Token | +|-|-|-|-| +| Local | possible | possible | possible | +| Remote, single instance | optional(1) | optional(1) | optional(1) | +| Semi-Local, shared, active-passive cluster | possible(1) | avoid(2) | avoid(2) | + +(1) can decrease response time + +(2) will break consistency + +Example: + ``` [d] /var └─[d] /lib @@ -116,18 +146,16 @@ Since 3.3.2 the item cache format can be toggled between SHA-256 or using mtime+ └─[d] /sync-token (automatic generated) ``` +### Activation of Cache Folder +#### Directory: .Radicale.cache/item + +Content may be moved, otherwise it's automatic re-generated on next request by client (one-time response delay depending on amount of items) #### Directory: .Radicale.cache/history -historic pre-compiled items +Content may be moved (in case of interest), otherwise historic data is lost #### Directory: .Radicale.cache/sync-token -file containing synchronization tokens related to each client serve only changes on request - -## Example for a simple storage layout - -Since 3.3.2 there are even more options to store the whole cache outside the `filesystem_folder` - -This can be used storing item cache local on the system, e.g. `/var/cache/radicale/collections/collection-cache` while the items, sync-token and history are stored in shared filesystem like NFS or GlusterFS. \ No newline at end of file +Content may be moved, otherwise lost and client will on next connection pull more data than usual if sync-token is used on client side \ No newline at end of file