
Configuration of the security cache system
The security cache system enables you to define the maximum number of users, roles, groups and ACL objects that can be cached. There are three ways in which you can customize the security cache system as explained below:
Configuring by editing the server.properties file
Edit the following four properties:
- server.security.user.cache.size
This should be an integer value. Its value indicates the maximum number of user objects that the security cache can store. The default value is 1000.
- server.security.role.cache.size
This should be an integer value. Its value indicates the maximum number of role objects that the security cache can store. The default value is 50.
- server.security.group.cache.size
This should be an integer value. Its value indicates the maximum number of group objects that the security cache can store. The default value is 50.
- server.security.protection.cache.size
This should be an integer value. Its value indicates the maximum number of ACL objects that the security cache can store. The default value is 100.
For instance,
- If server.security.user.cache.size=1000, the cache can then store at most 1000 user objects.
- If server.security.role.cache.size=100, the cache can then store 100 role objects.
- If server.security.group.cache.size=100, the cache can then store 100 group objects.
- If server.security.protection.cache.size=100, the cache can then store 100 ACL objects.
Configuring from the JReport Administration page
You must be a member of the administrator role in order to access the JReport Administration page.
- Log onto the JReport Administration page, click Configuration on the system toolbar, then click the Cache tab.
- In the Security Cache sub tab, four options are provided for specifying the cache size:
- User Cache Size
The maximum number of user objects that the security cache can store. Should be an integer value.
- Role Cache Size
The maximum number of role objects that the security cache can store. Should be an integer value.
- Group Cache Size
The maximum number of group objects that the security cache can store. Should be an integer value.
- Protection Cache Size
The maximum number of ACL objects that the security cache can store. Should be an integer value.
- When done, click OK to apply the settings.
Configuring using the API method
Invoke the following methods in the API class jet.server.api.admin.cfg.ConfigurationAdvanced:
/**
* Set the security user cache's size
* Setting the size of the cache to zero or negative means closing the security user cache.
* @param size
*/
public void setSecurityUserCacheSize(int size);
/**
* Get the size of the security user cache
* @return the size of the security user cache
*/
public int getSecurityUserCacheSize();
/**
* Set the size of the security role cache
* Setting the size of the cache to zero or negative means closing the security role cache
* @param size
*/
public void setSecurityRoleCacheSize(int size);
/**
* Get the size of the security role cache
* @return the size of the security role cache
*/
public int getSecurityRoleCacheSize();
/**
* Set the size of the security group cache
* Setting the size of the cache to zero or negative means closing the security group cache
* @param size
*/
public void setSecurityGroupCacheSize(int size);
/**
* Get the size of the security group cache
* @return the size of the security group cache
*/
public int getSecurityGroupCacheSize();
/**
* Set the size of the security protection cache
* Setting the size of the cache to zero or negative means closing the security protection cache
* @param size<
*/
public void setSecurityProtectionCacheSize(int size);
/**
* Get the size of the security protection cache
* @return the size of the security protection cache
*/
public int getSecurityProectionCacheSize();
|
