This documentation is for WSO2 Data Services Server 3.2.2. View documentation for the latest release.
Configuring the wso2caching Module - Data Services Server 3.2.2 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

The wso2caching module is a Web services caching module for WSO2 products as well as Apache Axis2. This implements both the server-side and client-side caching.  The steps below show how to configure the wso2caching module.

  1. Log in to the product's management console and select List under Modules .
  2. In the Deployed Modules page, click the Configure link associated with the wso2caching module.  
  3. The Global Caching Configuration page appears with the last saved configuration or the default configuration (if it is the first time you configure). Select Yes from Enable Caching drop-down list to enable the module and then fill in the necessary values. For example,     
    The configuration values are explained below:
    • Hash Generator : Specifies the fully qualified class name of the hash value generator. This class implements org.wso2.caching.digest.DigestGenerator interface. It is responsible for generating a Hash value for each request message, so that a matching response message can be located from the cache. The default is org.wso2.caching.digest.DOMHASHGenerator. The default hash generator is sufficient for general use, but you can also implement your own Hash generator class and use it.
    • Timeout : Specifies the time period, in milliseconds, that a cached response is kept in memory. Counting starts from the time the first request is received. Any request received after the counter has started and before the Timeout happens is served with the response that is cached. Once the Timeout expires, the cache will be updated with the response generated for the first request that was received after the expiry.
    • Maximum Cache Size : Holds the maximum number of response messages that will be cached. If the maximum number of responses are already cached and none of the cached responses' Timeouts have expired, then future responses are not cached until this memory is free enough to accommodate caching a new response.
    • Maximum Message Size : Hold the response message that is cached. Response messages larger than this (in size) are not cached. Caching is an expensive operation for larger messages, especially given the amount of memory required. Therefore, set this value considering the performance and resource trade-offs.

    It is recommended to analyze the dynamic nature of your services before you enable caching globally. For example, an operation that is supposed to generate random numbers will not benefit from caching previous responses, because it is supposed to generate a unique response for each invocation.

  • No labels