Cloud Application Integration (On-Premises) : Service Development : Building Services : About Service Run-Time Parameters : About Service Caching : Refreshing Service Cache by Using the Prefetch Option
Refreshing Service Cache by Using the Prefetch Option
You use the Prefetch property to specify whether or not you want the server to automatically refresh the cache for this service when it expires. If you set Prefetch to True, the server automatically re-executes the service (using the same set of inputs as before) to update its results in cache. This action also resets the cache expiration timer.
Keep the following points in mind when using Prefetch:
*Use Prefetch carefully. Overuse can quickly exhaust the memory available for cache.
*Do not use Prefetch with Java or C/C++ services that invoke access-controlled services. Such services will fail during prefetch because the embedded service will be invoked without the proper access privileges. To avoid this problem, enable Prefetch on the invoked services rather than on the Java or C/C++ services that call them.
*When you enable Prefetch, you must also set the Prefetch activation property to specify when the server should initiate a prefetch. This setting specifies the minimum number of times a cached result must be accessed (hit) in order for the server to prefetch results. If the server retrieves the cached results fewer times than specified in the Prefetch activation property, the server will not prefetch the service results when the cache expires.
*The cache may not be refreshed at the exact time the last hit fulfills the Prefetch activation requirement. It may vary from 0 to 15 seconds, according to the cache sweeper thread. For details, see the watt.server.cache.flushMins setting in Integration Server.
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback