Defining Cache Duration for WSDL and XSD

Defining Cache Duration for WSDL and XSD

In this article

Overview

Whenever you provide resources such as WSDLs and XSDs, in SOAP-based Snap Packs such as Workday, Xactly, NetSuite, Soap, and Birst, SnapLogic caches the data for some time. The default cache duration is four hours (240 minutes). You can modify this to any positive number by updating the Snaplex properties either through the SnapLogic Manager or by manually editing the Snaplex's global properties.

It is not recommended to set the cache duration to "0" as this disables the cache completely, and can cause severe performance issues for complex WSDLs that include the same core XSD files from other multiple XSD files. For example, loading the NetSuite WSDL would cause the core.xsd file to be loaded at least 15 times via multiple paths through its many XSD files that depend on the core definitions.

Modifying Cache Duration

Method 1: Defining the Cache Duration in the SnapLogic Manager

If your Snaplex uses the slpropz file, you can set the cache duration in SnapLogic Manager. 

  1. Confirm that the .slpropz is available in your Snaplex's snaplogic/etc folder. 

  2. In the Update Snaplex dialog, Node Properties tab, under Global propertiesadd the global property, "jcc.jvm_options = -Dsnaplogic.network.read.cache.duration.minutes=nnn", where nnn is the cache duration in minutes. For example, to decrease the cache duration to 1 minute, specify the Value as -Dsnaplogic.network.read.cache.duration.minutes=1.

     

  3. Click Apply. This updates the cache duration and restarts the Snaplex with the new setting.

 

Cache Property: Maximum Size

You can control the maximum size of the WSDL cache in SnapLogic by configuring the snaplogic.wsdl.cache.size property in Global properties. When the cache reaches the specified limit, the oldest entries are evicted, while still respecting the configured cache duration for each entry.

Examples

To set a maximum cache size of 25 WSDL definitions using the default cache duration of 4 hours:

  1. In the Global Properties section, add the following key-value pair:

    Key: jcc.jvm_options Value: -Dsnaplogic.wsdl.cache.size=25
  2. Use the default cache duration of 4 hours (240 minutes). You do not have to set any additional property for duration unless you want to change it. If needed, you can configure the cache duration separately.

  3. Save the configuration and apply the changes. This will require a Snaplex restart for the new settings to take effect.

wsdl-max-cache-size-1.png

This configuration will ensure that the WSDL cache holds a maximum of 25 definitions at any time, with each entry expiring after the default duration of 4 hours.

To specify a maximum cache size of 50 with a cache duration of 30 minutes.

Global Properties:

Key: jcc.jvm_options -Dsnaplogic.wsdl.cache.size=50 Value: jcc.jvm_options -Dsnaplogic.network.readh.cache.duration.minutes=30

Related information