際際滷

際際滷Share a Scribd company logo
Cache scope
By Muralidhar.Gumma
The Cache Scope is a Mule feature for storing and reusing frequently called data. The Cache
Scope saves on time and processing load.
 Cache scope determines whether the messages payload is consumable. A consumable payload can
only be read once before it is lost  such as a streaming payload  and cannot be cached.
 If the message payload is consumable, cache scope always processes the message; nothing is cached
and the caching strategy is abandoned.
 If the message payload is not consumable, cache scope continues to the next step in the caching
strategy.
Lets go through an example to get a better idea.
These are the configurations of elements
Mule CacheScope
Mule CacheScope
Mule CacheScope
Mule CacheScope
Run the application . after it gets deployed, trigger a get request in postman and observe the output
Observer the logger message in console which is because the second flow is triggered for the first
request
Send the same request for the second time the response has come.
Notice that the logger has not come this time. This is because the second flow is not triggered.

More Related Content

Mule CacheScope

  • 2. The Cache Scope is a Mule feature for storing and reusing frequently called data. The Cache Scope saves on time and processing load. Cache scope determines whether the messages payload is consumable. A consumable payload can only be read once before it is lost such as a streaming payload and cannot be cached. If the message payload is consumable, cache scope always processes the message; nothing is cached and the caching strategy is abandoned. If the message payload is not consumable, cache scope continues to the next step in the caching strategy.
  • 3. Lets go through an example to get a better idea.
  • 4. These are the configurations of elements
  • 9. Run the application . after it gets deployed, trigger a get request in postman and observe the output
  • 10. Observer the logger message in console which is because the second flow is triggered for the first request
  • 11. Send the same request for the second time the response has come.
  • 12. Notice that the logger has not come this time. This is because the second flow is not triggered.