Product Merchandising Rule Caching Optimization for SuiteCommerce
Optimize product merchandising rule caching in SuiteCommerce to enhance performance by adjusting the cache time to as low as five minutes.
Caching product merchandising rules significantly enhances performance by reducing the time new rules take to become active. By default, a new merchandising rule becomes active after approximately two hours. For businesses needing quicker updates, adjustments can be made within the DM_SS_Library.js file of the Product Merchandising bundle.
How to Adjust Caching Times
Caching for product merchandising rules is handled through the TTL = attribute, which is defined in two instances:
- The default setting is
MAX_TTL, imposing a two-hour cache duration. - To expedite the activation of merchandising rules, change both instances to
MIN_TTL, effectively shortening the cache time to about five minutes.
Keep in mind that while reducing cache times can improve responsiveness, it may also impact overall system performance due to increased load.
Code Sample for Setting TTL
The following JavaScript function can be used to set the time-to-live (TTL) value for your caching rules:
1"text-purple-400">function setTTL(paramValue){2 //ttl is not defined3 "text-purple-400">if(paramValue == null || paramValue == undefined || paramValue == ''){4 ttl = MAX_TTL;5 "text-purple-400">return ttl;6 }7 8 //ttl is defined but invalid9 "text-purple-400">var paramValueInt = parseInt(paramValue);10 "text-purple-400">if(isNaN(paramValueInt) || paramValueInt < MIN_TTL || paramValueInt > MAX_TTL){11 ttl = MAX_TTL;12 "text-purple-400">return ttl;13 }14 "text-purple-400">else{15 ttl = paramValueInt;16 "text-purple-400">return paramValueInt;17 }18}This function checks for valid TTL values and assigns MAX_TTL as a fallback if provided input is invalid.
Related Caching Concepts
Understanding how to efficiently manage caching is critical for maintaining optimal site performance. Familiarize yourself with:
- Cache Invalidation: Learn how to clear the cache before expiration to reflect updated data.
- CDN Caching: Explore caching mechanisms at the Content Delivery Network level.
Who This Affects
This information is especially relevant for:
- Developers implementing product merchandising rules.
- Administrators looking to optimize system performance.
- E-commerce managers aiming to enhance user experience through faster product updates.
Key Takeaways:
- Default caching for product merchandising is set to two hours.
- Modifying the caching duration can reduce time for new rule activation to five minutes.
- Caching performance can be fine-tuned through the adjustment of parameters in
DM_SS_Library.js. - Proper management of caching is essential to balance performance and resource load.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
What file must I modify to adjust the caching time for product merchandising rules in SuiteCommerce?
How can I reduce the default caching time for product merchandising rules from two hours to five minutes?
Does reducing the cache time for merchandising rules affect system performance?
What happens if the TTL value set for caching is invalid?
Was this article helpful?
More in Commerce
- Available Items Only Feature in NetSuite 2026.1
Available items only filtering boosts sales efficiency in NetSuite 2026.1 with Intelligent Item Recommendations.
- Commerce Extensions in NetSuite 2026.1
Commerce Extensions in NetSuite 2026.1 enhance performance and user experience in eCommerce.
- Convert Multiple Transaction Line Items into Configured Items in
Enhance transaction processing in NetSuite by converting multiple line items into configured items with improved session handling.
- New SuiteCommerce Features in NetSuite 2026.1
New SuiteCommerce features in NetSuite 2026.1 enhance user experience and improve eCommerce efficiency.
