Product Merchandising Rule Caching
Product merchandising rules are cached to improve performance. By default, it takes about two hours before a new merchandising rule becomes active. If you want to shorten the cache time, you must make changes to DM_SS_Library.js
in the Product Merchandising
bundle.
Caching for product merchandising rules is defined in two instances of the TTL =
attribute. By default, it's set to MAX_TTL
, which means a two-hour cache. To cut it down to about five minutes, change both to MIN_TTL
.
Keep in mind that reducing cache times can affect performance.
function setTTL(paramValue){
//ttl is not defined
if(paramValue == null || paramValue == undefined || paramValue == ''){
ttl = MAX_TTL;
return ttl;
}
//ttl is defined but invalid
var paramValueInt = parseInt(paramValue);
if(isNaN(paramValueInt) || paramValueInt < MIN_TTL || paramValueInt > MAX_TTL){
ttl = MAX_TTL;
return ttl;
}
else{
ttl = paramValueInt;
return paramValueInt;
}
}