When a K2 connect service instance is executed, the connection along with the structure of the object (not the data) is cached and used on subsequent executions. The cache is available during the current session of the K2 server and the first execution takes the normal amount of time, but subsequent executions are faster. If any errors occur or changes are made to the object the cache is invalidated.
The cache is a configurable setting that is disabled by default. To enable the caching perform the following steps:
- Open the SmartObject Service Tester.exe (SmartObject Tester Tool) located in C:\\Program Files(x86)\K2 blackpearl\Bin.
- Locate the required service instance.
- Right-click and Edit Service Instance.
- Change usecache – Required from false to true.
- Click Next.
||Note: Data from SAP is NOT cached - only the connection and the structure of the BAPI being executed is cached. This eliminates some calls to SAP to recreate the BAPI structure on each call. The first execution creates and caches the structures. If caching is enabled, memory usage of the K2 server increases and should be monitored.