This documentation is for WSO2 Enterprise Service Bus version 4.9.0 . View documentation for the latest release.

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Localtab Group
Localtab
activetrue
titleFinder

cache mediator properties

The parameters available to configure the Cache mediator are as follows.

Parameter NameDescription
Cache IDThe ID of the cache configuration. If you have multiple cache mediators within your Synapse configuration, define Cache IDs to map the corresponding collector and finder. 
Cache Scope

The scope of the cache. Possible values are as follows.

  • Per-Host: The cache is kept only for the current host in a cluster.
  • Per-Mediator: The cache is kept once for the whole cluster.
Cache Type

This parameter specifies whether the mediator should be in the incoming path (to check the request) or in the outgoing path (to cache the response). Possible values are as follows.

  • Finder: If this is selected, the mediator is used to search for the request hash of incoming messages.
  • Collector: If this is selected, the mediator is used to collect response messages in the cache.
Hash Generator

This parameter is used to define the logic used by the mediator to evaluate the has values of incoming messages. The value should be a class implementing the org.wso2.carbon.mediator.cache.digest.DigestGenerator class interface. The default hash generator is org.wso2.carbon.mediator.cache.digest.DOMHASHGenerator. If the generated hash value is found in the cache, then the cache mediator will execute the onCacheHit sequence which can be specified inline or referenced.

org.wso2.carbon.mediator.cache.digest.DOMHASHGenerator uses only the message body to generate the hash value. However, org.wso2.carbon.mediator.cache.digest.REQUESTHASHGenerator considers the recipient (To) address of the request, HTTP headers and XML Payload in generating the hash value. Therefore, this uniquely identifies the HTTP request with the same recipient (To) address, headers and payload.

Cache Timeout (seconds)The time duration for which the cache is kept. The cache expires once this time duration elapses.
Maximum Message SizeThe maximum size of the messages to be cached. This is specified in bytes.
Implementation TypeThis parameter is used to specify whether the cache is memory-based or disk-based. Currently, In-Memory is the only value available to be selected.
Maximum SizeThe maximum number of elements to be cached. The default size is 1000.
AnonymousIf this option is selected, an anonymous sequence is executed when an incoming message is identified as an equivalent to a previously received message based on the value defined for the Hash Generator field.
Sequence ReferenceThe reference to the onCacheHit sequence to be executed when an incoming message is identified as an equivalent to a previously received message based on the value defined for the Hash Generator field. This sequence should be specified in the Registry in order to be selected for this field. You can click either Configuration Registry or Governance Registry as relevant to select the sequence from the resource tree.
Localtab
titleCollector

  

The parameters available to configure the Cache mediator are as follows.

Parameter NameDescription
Cache IDThe ID of the cache configuration. If you have multiple cache mediators within your Synapse configuration, define Cache IDs to map the corresponding collector and finder. 
Cache Scope

The scope of the cache. Possible values are as follows.

  • Per-Host: The cache is kept only for the current host in a cluster.
  • Per-Mediator: The cache is kept once for the whole cluster.
Cache Type

This parameter specifies whether the mediator should be in the incoming path (to check the request) or in the outgoing path (to cache the response). Possible values are as follows.

  • Finder: If this is selected, the mediator is used to search for the request hash of incoming messages.
  • Collector: If this is selected, the mediator is used to collect response messages in the cache.


...