https://fedorahosted.org/freeipa/ticket/4739
--
David Kupka
From 796fd4291dd17128e7bdfecf2d14ae7b151987f5 Mon Sep 17 00:00:00 2001
From: David Kupka <dku...@redhat.com>
Date: Fri, 1 Jul 2016 07:34:43 +0200
Subject: [PATCH] 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
---
 ipaserver/plugins/schema.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py
index c7aa5f36c37d39a5131ca8ad915cb6e61bb748ec..a82b357899a483fd3b3dc9f7407bd26a4c03aada 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
-- 
2.7.4

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to