Caching

In this section:

iWay Application Adapter for Microsoft Dynamics CRM 2011 On-Premises caching provides a mechanism that transparently stores data so that future requests for that data can be served faster. The current adapter cache implementation stores the following two types of data:

Each unique target configuration owns its own cache instance. Two targets are unique if their parameters are completely equal. For example, if a user connects to a target, then its cache instance is created and stored in a cache collection. If this user (or another user) connects to a different target with identical parameters, the cache instance is reused and is not created. Cache instances are removed when the last user that uses it disconnects from a target.

The following two ways are used if a user wants to reset the cache:


Top of page

x
Metadata Caching

Caching of metadata allows you to control time and traffic while requesting it from MS CRM. Metadata is needed for schema generation, input and output transformation, generation of the iIT tree, and better performance. Memory saving all metadata is filtered so that it contains only information necessary for regular adapter execution.


Top of page

x
Schemas Caching

If you select any operation for a specific entity, input and output schemas will be saved to the cache and can be retrieved from it at a later time. Cached schemas are also used for input file validation.


Top of page

x
Configuring Cache

Cache configuration is represented only by the Cache max objects option within the Advanced group in the iIT target creation wizard. This setting defines the maximum number of objects in a cache. If the limit of cache expires, the most rarely used object is removed. It is recommended to set this number to less than 100, since the average filtered metadata size is about 600-800 kb. Greater numbers may lead to out of memory errors, especially if multiple targets are used simultaneously.

Each target has its own cache instance. A cache instance is released when an adapter is passivated, or released. For runtime, the Persist Connection option must be enabled or else the cache will be released after every document execution cycle. To enable the Persist Connection option, logon to the iSM Administration Console, click Registry, and then click Adapters in the left pane. From the list of available adapters, select the target that is configured for the MS CRM 2011 adapter. For the Persist Connection option that is listed, select the On check box, as shown in the following image.

When the iWay Application Adapter for Microsoft Dynamics CRM 2011 On-Premises is deployed as a component in a process flow, change the Persist Connection property to true in the iIT Adapter Object page. The Persist Connection property should also be set to On in iSM.

iWay Application Adapter for Microsoft Dynamics CRM 2011 On-Premises can receive small values in parameters from the user, but it can also use greater and more reasonable values (currently, it is 20). Using a smaller amount of cache is almost useless.


iWay Software