Contact Us 1-800-596-4880

Configure the Cache Scope

Standard Support for Mule 4.1 ended on November 2, 2020, and this version of Mule reached its End of Life on November 2, 2022, when Extended Support ended.

Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted.

MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements.

  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.

      Examples:

      • 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.