Nexus Repository 2 officially sunsetted June 30, 2025. Visit my.sonatype.com for archived documentation. Migrate to Sonatype Nexus Repository 3 as soon as possible.
Nexus Repository 2 Professional caches valid LDAP authentication attempts for the period of time specified in the "Cache Duration" setting under the LDAP server's connection settings. The default time for cache entries to live is 5 minutes.
In older versions of Nexus Repository 2 the cache size is set to 100. Starting in version 2.4 the default cache size was increased to 1000, and may be configured.
If you have a lot of users frequently accessing the server using LDAP authentication you can increase the cache size by editing "nexus/WEB-INF/classes/ehcache.xml" and adding an entry like the following entry to it:
<cache name="enterprise-ldap"
maxElementsInMemory="10000"
eternal="false"
overflowToDisk="false"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="0"
memoryStoreEvictionPolicy="LRU"
timeToLiveSeconds="1"
timeToIdleSeconds="1"
/>