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.
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
- Log on to the Commerce Manager Client.
- In the Activity menu, choose Configuration.
- In the Configuration menu, choose System Configuration.
- Select the setting.
- Expand Setting Definition Metadata.
- Select sfRefreshStrategy and click Edit.
- Modify the refresh strategy's Value.
- Click Save.
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