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.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.