Improving marketing performance by using caching
To improve marketing performance, use runtime caching to eliminate processing to and from the database.
Before you begin
There are three aspects to gaining improvements in Commerce Lab marketing: JSP caching, marketing business object caching, and marketing command caching.
JSP caching is based on DynaCache that uses an attribute to load a cached JSP for the e-Marketing Spot display.
Espot REST API caching is also based on Dynacache, and uses provided sample cachespec.xml rules which must be explicitly enabled.
Marketing business object caching involves a distributed map cache that manages memory allocation. The best practice is to tune the cache.
Marketing command caching stores the results of web service calls that load the business
object to display to the customer. The cache size is adjustable. The best practice is to enable the cache.
- For more information, see Command caching for marketing and Setting up command caching for marketing.Note: Command caching for marketing and Setting up command caching for marketing only applies to versions before 9.1.13+ and is enabled by default.
- Enabling marketing Espot REST API caching
- Enabling REST API caching for static Espots can improve performance. All Espots with static content shown to shoppers will then be cached. For more information, see Emerald REST Caching On TS Server for Commerce 9.1.
- Marketing Espot REST API caching
- When the sample cachespec.xml rules have been enabled, marketing Espot REST API calls from the storefront to the transaction server will be cached when the Espot content rendered on the storefront is computed to be static content. This will result in a significant performance improvement with the processing of static Espots. Static Espots are defined as Espots where the content shown will be the same for all shoppers. Unlike dynamic Espots, different shoppers may see targeted personalized content in a Espot. Dynamic Espots are never cached. A static Espot REST API call will return behavior=0 in its response, dynamic Espots will return behavior=1.