The Remove Cached Attribute filter allows you to delete
a message attribute value that has been stored in a cache. Each cache
is essentially a map of name-value pairs, where each value is keyed on a
particular message attribute. For example, it is possible to store a
cache of request messages according to their message ID. In this
case the message's id attribute would be the key
into the cache, which would store the value of the request message's
content.body message attribute.
In this example, the Remove Cached Attribute filter can
be used to remove a particular entry from the cache based on the
run-time value of a particular message attribute. By specifying the
id message attribute to remove, the Enterprise Gateway will
look up the cache based on the value of the id
message attribute. When it finds a matching message ID in the cache, it
will remove the corresponding entry from the cache.
The example described above may be useful in cases where a request message
may need to be cached and stored until the request has been fully
processed and a response returned to the client. For example, if the
request must be routed on to a back-end Web Service, but that Web Service
is temporarily unavailable, it may be possible to configure the circuit
to re-send the cached request instead of forcing the client to retry.
For more information on how to configure a "caching circuit", please
refer to the Global Caches
tutorial.
|