diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index f590a294..640025fe 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -812,6 +812,18 @@ Available backends: Default: `none` +##### cache_logins + +Cache successful logins until expiration time + +Default: `false` + +##### cache_logins_expiry + +Expiration time of caching successful logins in seconds + +Default: `5` + ##### htpasswd_filename Path to the htpasswd file. diff --git a/config b/config index c34b9d28..429cfca1 100644 --- a/config +++ b/config @@ -62,6 +62,12 @@ # Value: none | htpasswd | remote_user | http_x_remote_user | ldap | denyall #type = none +# Cache successful logins for until expiration time +#cache_logins = false + +# Expiration time for caching successful logins in seconds +#cache_logins_expiry = 5 + # URI to the LDAP server #ldap_uri = ldap://localhost diff --git a/radicale/config.py b/radicale/config.py index 0ac5970c..486e9223 100644 --- a/radicale/config.py +++ b/radicale/config.py @@ -183,6 +183,14 @@ DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([ "help": "authentication method", "type": str_or_callable, "internal": auth.INTERNAL_TYPES}), + ("cache_logins", { + "value": "false", + "help": "cache successful logins for until expiration time", + "type": bool}), + ("cache_logins_expiry", { + "value": "5", + "help": "expiration time for caching successful logins in seconds", + "type": int}), ("htpasswd_filename", { "value": "/etc/radicale/users", "help": "htpasswd filename",