diff options
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/Connection.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 78a5f93d29e..1cf7f520a78 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -311,6 +311,9 @@ class Connection extends LDAPUtility { $key = $this->getCacheKey($key); $value = base64_encode(json_encode($value)); $ttl = $ttlOverride ?? $this->configuration->ldapCacheTTL; + // TODO: make jitter configurable (or disable)? + $ttlJitter = 0.1; + $ttl = random_int($ttl * (1 - $ttlJitter), $ttl * (1 + $ttlJitter)); $this->cache->set($key, $value, $ttl); } |