Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Setting Refresh Strategies

Setting Refresh Strategies

Application administrators can change system values at any time through the configuration activity in the Commerce Manager. Most changes take effect immediately. However, for some properties, applying the change immediately would have a negative impact on user experience. In this scenario, you should use a refresh strategy that will minimize the impact of setting value changes.

Note:

Only settings that have a noticeable effect on the end user experience have a refresh strategy, such as settings that affect the storefront display. Changes to other settings are applied immediately.

Refresh strategy types

There are four types refresh strategies:

  • Application
  • Session
  • Interval
  • Immediate

Application refresh strategy

Settings that use the application refresh strategy are only updated after the application is restarted.

Session refresh strategy

Settings that use the session refresh strategy do not change during the lifetime of a user's session. If an administrator changes the setting value, users will not see the change until their session cookie is removed or expires and a new session is created. This strategy is used for settings that need to remain consistent during the course a user's session.

Interval refresh strategy

Settings that use the interval refresh strategy are cached and are only refreshed after a specified period of time. As a result, users do not see changes to these settings until the cache interval expires. When this strategy is used, the setting value must specify the name of one of the cache settings. The value of the specified cache setting indicates the refresh interval.

Immediate refresh strategy

Settings that use the immediate refresh strategy are not cached. As soon as the administrator changes a setting, the change is applied. Since the values are not cached, the database must be queried every time they are required. This may cause some performance degradation in high-traffic areas of the system.

Modifying a setting's refresh strategy

  1. Log on to the Commerce Manager Client.
  2. In the Activity menu, choose Configuration.
  3. In the Configuration menu, choose System Configuration.
  4. Select the setting.
  5. Expand Setting Definition Metadata.
  6. Select sfRefreshStrategy and click Edit.
  7. Modify the refresh strategy's Value.
  8. Click Save.
Note:

Some settings, such as COMMERCE/SYSTEM/userIdMode, have two refresh strategies: sfRefreshStrategy and coreRefreshStrategy.

  • sfRefreshStrategy is the refresh strategy storefront uses.
  • coreRefreshStrategy is the refresh strategy Core uses in an OSGi environment, such as the Cortex