summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Kupka <dkupka@redhat.com>2016-07-01 07:34:43 +0200
committerMartin Basti <mbasti@redhat.com>2016-07-01 09:22:57 +0200
commite5635f7ef423c7b203004a0cbf625360d351a78e (patch)
treefa2a51731215f7df909327c33db31550f185973b
parent08fcc7e25af54379eec87f4e22f8cd26db7ffbb0 (diff)
downloadfreeipa-e5635f7ef423c7b203004a0cbf625360d351a78e.zip
freeipa-e5635f7ef423c7b203004a0cbf625360d351a78e.tar.gz
freeipa-e5635f7ef423c7b203004a0cbf625360d351a78e.tar.xz
schema: Decrease schema TTL to one hour
Since checking schema is relatively cheap operation (one round-trip with almost no data) we can do it offten to ensure schema will fetched by client ASAP after it was updated on server. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Petr Spacek <pspacek@redhat.com>
-rw-r--r--ipaserver/plugins/schema.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py
index c7aa5f3..a82b357 100644
--- a/ipaserver/plugins/schema.py
+++ b/ipaserver/plugins/schema.py
@@ -21,7 +21,10 @@ from ipapython.version import API_VERSION
# Schema TTL sent to clients in response to schema call.
# Number of seconds before client should check for schema update.
-SCHEMA_TTL = 7*24*3600 # default: 7 days
+# This should be long enough to not slow down regular work or skripts
+# but also short enough to ensure schema will be retvieved soon after
+# it was updated
+SCHEMA_TTL = 3600 # default: 1 hour
__doc__ = _("""
API Schema