Contact Free trial Login

Configure the Cache Scope

  1. In your Mule app, add a Cache scope to a flow.

  2. Click to open the General tab for the Cache scope.

  3. Configure the Cache scope:

    • Provide a Display Name.

    • Select a Caching Strategy.


      • From the UI: My_Caching_Strategy

      • In the Studio XML: cachingStrategy-ref="My_Caching_Strategy"

        MuleSoft recommends that you reference a Caching Strategy that uses an ObjectStore instead of using the default in a production environment.

        If you need to create a Caching Strategy, see the procedure in See Also.

  4. Opt to set up a filter for specific payloads if you need one.

    Example that uses a DataWeave expression: filterExpression="#[user.isPremium()]"

    If the message matches the expression(s), Mule executes the Caching Strategy.

    If the message does not match expression(s), Mule processes the message through all message processors within the Cache scope but never saves or produces cached responses.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub