Java API global caching
You can use a global cache to improve the performance and scalability of Java™ API applications.
By default, every DKDatastoreICM instance stores certain objects (DKDatastoreICM instances) in memory within a local cache (that is, other DKDatastoreICM instances cannot access it). These objects can include item type, item type view, component type, component type view, and so on. Caching improves response times by saving the Java API from repeatedly communicating with the library server to manifest these objects.
- Attribute
- Attribute group
- Event type
- Link type
- XDO classification
- Mime type
- NLS keywords
- Semantic type
- Privilege
- Privilege group
To enable the global cache, edit the IBMCMROOT/cmgmt/connectors/cmbicmcache.ini file
by applying the following setting: JAVAGlobalCacheEnabled=TRUE.
You must clear the global cache whenever modifications (such as create, update, or delete) are made to any of the definition objects except for NLS keywords. For cache clearing examples, refer to the following examples.
Clearing the global and local caches of all datastores for an application that uses its own implementation of datastore pool
dsPool.clearCacheOfConnections(DK_CM_CLEAR_CACHE_ALL);This
example ensures that the global cache is cleared once and the local
cache of all datastores are cleared.Clearing both the local and global cache
dsICM.clearCache(DK_CM_CLEAR_CACHE_ALL);Clearing only the local cache
dsICM.clearCache(DK_CM_CLEAR_CACHE_LOCAL);Clearing only the global cache
dsICM.clearCache(DK_CM_CLEAR_CACHE_GLOBAL);If
the application does not set the option by using setOption() method
but calls clearCache(), the DK_CM_CLEAR_CACHE_ALL method
is used.
do not document user cache, JAVAUserCacheEnabled=TRUE