Commit c3ee16ec authored by Christophe Maudoux's avatar Christophe Maudoux

Append handler internal cache timeout parameter (#1535)

parent 7853fae4
......@@ -62,6 +62,7 @@ sub defaultValues {
'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/'
},
'groups' => {},
'handlerInternalCache' => 15,
'hiddenAttributes' => '_password',
'httpOnly' => 1,
'infoFormMethod' => 'get',
......
......@@ -197,7 +197,7 @@ sub defaultValuesInit {
cookieExpiration cookieName customFunctions httpOnly
securedCookie timeout timeoutActivity
timeoutActivityInterval useRedirectOnError useRedirectOnForbidden
useSafeJail whatToTrace
useSafeJail whatToTrace handlerInternalCache
)
);
......
......@@ -437,7 +437,7 @@ sub retrieveSession {
# (15 seconds)
if ( defined $class->data->{_session_id}
and $id eq $class->data->{_session_id}
and ( $now - $class->dataUpdate < 15 ) )
and ( $now - $class->dataUpdate < $class->tsv->{handlerInternalCache} ) )
{
$class->logger->debug("Get session $id from Handler internal cache");
return $class->data;
......
......@@ -1159,6 +1159,10 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
},
'type' => 'keyTextContainer'
},
'handlerInternalCache' => {
'default' => 15,
'type' => 'int'
},
'hiddenAttributes' => {
'default' => '_password',
'type' => 'text'
......
......@@ -414,6 +414,11 @@ sub attributes {
documentation =>
'Avoid asking confirmation when an Issuer asks to renew auth',
},
handlerInternalCache => {
type => 'int',
default => 15,
documentation => 'Handler internal cache timeout',
},
# Loggers (ini only)
logLevel => {
......
......@@ -50,7 +50,7 @@ my @notManagedAttributes = (
# Other ini-only prms
'configStorage', 'status', 'localStorageOptions', 'localStorage',
'max2FDevices', 'max2FDevicesNameLength', 'checkTime',
'mySessionAuthorizedRWKeys',
'mySessionAuthorizedRWKeys', 'handlerInternalCache'
);
# Words used either as attribute name and node title
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment