Files
freeipa/ipaserver/plugins
Rob Crittenden 331cadd8f2 Make the schema cache TTL user-configurable
The API schema is not checked for changes until after a TTL
is expired. A one-hour TTL was hardcoded which makes development
tedious because the only way to force a schema update is to
remember to remove files between invocations.

This adds a new environment variable, schema_ttl, to configure
the TTL returned by the server to schema() calls. This can be
set low to ensure a frequent refresh during development.

If the client is in compat mode, that is if client is working
against a server that doesn't support the schema() command,
then use the client's schema_ttl instead so that the user still
has control.

Re-check validity before writing the cache. This saves us both
a disk write and the possibility of updating the expiration
with a ttl of 0. This can happen if the fingerprint is still
valid (not expired, no language change) the schema check is
skipped so we have no server-provided ttl.

https://pagure.io/freeipa/issue/8492

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2021-11-04 09:44:39 +01:00
..
2010-12-20 17:19:53 -05:00
2017-03-27 19:08:26 +02:00
2021-07-12 17:17:51 -04:00
2021-07-12 17:17:51 -04:00
2020-07-07 10:07:48 -04:00
2018-01-09 07:53:28 +01:00
2021-11-03 11:02:00 +01:00
2019-10-21 18:01:32 +11:00
2019-03-28 00:21:00 +01:00
2020-03-31 09:21:37 +03:00
2020-09-23 14:49:15 +02:00
2021-05-12 11:55:50 -04:00
2018-01-09 07:53:28 +01:00
2020-05-05 10:42:46 +02:00
2019-03-28 00:21:00 +01:00