My webMethods Server 10.1 | My webMethods Server Webhelp | Document Conventions | Startup and Configuration | Modifying Configuration Files | Configuring Role or Group Cache Lifecycle Calculation
 
Configuring Role or Group Cache Lifecycle Calculation
By default, the role cache or group cache for a user is recalculated on every user login. Conditions in which the calculation involves user or group searches that take a long time can result in poor performance in My webMethods Server and in LDAP servers to which it is connected. A configuration option in the cache.xml file enables the role cache or group cache to be persisted across user log-ins, causing large performance improvements.
Because the roles are no longer calculated at user login, this optimization modifies the dynamic role capability. With the default setting, where the roles are calculated at user login, the user gains or loses role changes at that time. With the new setting, if a dynamic query role changes the results, the user does not immediately get the change. Role changes made by the system administrator will, however, be recognized. In this mode, static roles function correctly with the new setting. Dynamic roles do not return expected changes until an administrator changes role membership or adds a description, or until the various caches time out.
Under optimization, because My webMethods Server does not control group definition, the Group cache is not updated until the cache entry times out or a system restart occurs. If users change group membership frequently, group cache optimization may not be desirable.
The choice of whether to perform role cache or group cache recalculation at login is a trade-off between performance and functionality.
*To configure role cache or group cache lifecycle calculation
1. At a command line prompt, type the following command to move to the server’s bin directory:
cd Software AG_directory\MWS\bin
2. To retrieve the cache.xml file from the My webMethods Server database, type the following command:
mws getconfig cache.xml
3. Open the downloaded cache.xml file in a text editor and modify it as needed.
You can find the file at this location:
Software AG_directory \MWS\server\serverName\config
4. Open the cache.xml file in a text editor and locate the cache.
*Role cache:
<cache name="RoleCache"
class="com.webmethods.portal.service.cache.impl.RoleCache"
maxSize="1000"
defaultCacheTimeout="3600000"
roleCacheLifecycle="0"
isClustered="true"
ID="11"
enabled="true"/>
*Group cache:
<cache name="GroupCache"
class="com.webmethods.portal.service.cache.impl.GroupCache"
maxSize="1000"
defaultCacheTimeout="3600000"
groupCacheLifecycle="0"
isClustered="true"
ID="19"
enabled="true"/>
5. Modify the value of roleCacheLifecycle or groupCacheLifecycle as needed:
Value
Action
0
(Default) Causes the cache to be recalculated at user login.
1
Causes the cache to be persisted across user logins.
6. Save and close the file.
7. To deploy the revised file to the My webMethods Server database, type the following command:
mws putconfig cache.xml
8. Delete the file from the \serverName\config directory.
If you do not delete the file, this server instance will continue to use the local version of the configuration file.
9. Restart the node using the following command:
mws -s serverName restart
Changes to configuration files are not applied until after a restart.