Browse Source

change default cache times

Peter Bieringer 1 year ago
parent
commit
79ba07e16b
3 changed files with 11 additions and 7 deletions
  1. 4 3
      DOCUMENTATION.md
  2. 5 2
      config
  3. 2 2
      radicale/config.py

+ 4 - 3
DOCUMENTATION.md

@@ -814,7 +814,8 @@ Default: `none`
 
 ##### cache_logins
 
-Cache successful/failed logins until expiration time
+Cache successful/failed logins until expiration time. Enable this to avoid
+overload of authentication backends.
 
 Default: `false`
 
@@ -822,13 +823,13 @@ Default: `false`
 
 Expiration time of caching successful logins in seconds
 
-Default: `5`
+Default: `15`
 
 ##### cache_failed_logins_expiry
 
 Expiration time of caching failed logins in seconds
 
-Default: `60`
+Default: `90`
 
 ##### htpasswd_filename
 

+ 5 - 2
config

@@ -62,11 +62,14 @@
 # Value: none | htpasswd | remote_user | http_x_remote_user | ldap | denyall
 #type = none
 
-# Cache successful logins for until expiration time
+# Cache logins for until expiration time
 #cache_logins = false
 
 # Expiration time for caching successful logins in seconds
-#cache_logins_expiry = 5
+#cache_successful_logins_expiry = 15
+
+## Expiration time of caching failed logins in seconds
+#cache_failed_logins_expiry = 90
 
 # URI to the LDAP server
 #ldap_uri = ldap://localhost

+ 2 - 2
radicale/config.py

@@ -188,11 +188,11 @@ DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([
             "help": "cache successful/failed logins for until expiration time",
             "type": bool}),
         ("cache_successful_logins_expiry", {
-            "value": "5",
+            "value": "15",
             "help": "expiration time for caching successful logins in seconds",
             "type": int}),
         ("cache_failed_logins_expiry", {
-            "value": "60",
+            "value": "90",
             "help": "expiration time for caching failed logins in seconds",
             "type": int}),
         ("htpasswd_filename", {