Peter Bieringer пре 1 година
родитељ
комит
74311560c9
3 измењених фајлова са 26 додато и 0 уклоњено
  1. 12 0
      DOCUMENTATION.md
  2. 6 0
      config
  3. 8 0
      radicale/config.py

+ 12 - 0
DOCUMENTATION.md

@@ -812,6 +812,18 @@ Available backends:
 
 
 Default: `none`
 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
 ##### htpasswd_filename
 
 
 Path to the htpasswd file.
 Path to the htpasswd file.

+ 6 - 0
config

@@ -62,6 +62,12 @@
 # Value: none | htpasswd | remote_user | http_x_remote_user | ldap | denyall
 # Value: none | htpasswd | remote_user | http_x_remote_user | ldap | denyall
 #type = none
 #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
 # URI to the LDAP server
 #ldap_uri = ldap://localhost
 #ldap_uri = ldap://localhost
 
 

+ 8 - 0
radicale/config.py

@@ -183,6 +183,14 @@ DEFAULT_CONFIG_SCHEMA: types.CONFIG_SCHEMA = OrderedDict([
             "help": "authentication method",
             "help": "authentication method",
             "type": str_or_callable,
             "type": str_or_callable,
             "internal": auth.INTERNAL_TYPES}),
             "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", {
         ("htpasswd_filename", {
             "value": "/etc/radicale/users",
             "value": "/etc/radicale/users",
             "help": "htpasswd filename",
             "help": "htpasswd filename",