During some operations such as rendering pages, Confluence makes a large number of queries to the user management subsystem (OSUser). To cater for this, the OSUser providers built in to Confluence in v1.0 performed a certain amount of in-memory caching of user identities. Unfortunately, this means that if you configure Confluence to use some other provider (such as LDAP or JIRA), this caching is no longer performed, and the application slows significantly as a result.
This document is aimed at Confluence users who have, or wish to have Confluence use an external user management through customising their osuser.xml
file. If you are just using Confluence's built-in user-management, you do not need to read this document.
Note
While the caching providers should work with any OSUser provider, we have only tested them against Confluence's built-in user-management, and the JIRA provider that ships with Confluence.
Provider Configuration
Confluence 1.0.1 introduces the following OSUser providers: com.atlassian.confluence.user.providers.CachingCredentialsProvider
, com.atlassian.confluence.user.providers.CachingAccessProvider
, com.atlassian.confluence.user.providers.CachingProfileProvider
. They are written as caching wrappers around another provider that does all the real work. So, for example, this is the default CredentialsProvider
configuration that ships with Confluence:
<provider class="com.atlassian.confluence.user.providers.CachingCredentialsProvider">
<property name="chain.classname">
com.opensymphony.user.provider.hibernate.HibernateCredentialsProvider
</property>
<property name="chain.configuration.provider.class">
com.atlassian.confluence.user.ConfluenceHibernateConfigProvider
</property>
</provider>
To configure the caching provider, you need to supply:
- The class-name of the provider that will ultimately be providing the credentials, as the property
chain.classname
- Any properties that need to be passed to that next provider. If the next provider requires a property
configuration.provider.class
, then you can pass that property to the provider by prepending chain.
to the property name: chain.configuration.provider.class
The configuration for the Access and Profile providers is identical.