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>
This commit is contained in:
David Kupka 2016-07-01 07:34:43 +02:00 committed by Martin Basti
parent 08fcc7e25a
commit e5635f7ef4

View File

@ -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