Marketing cache design considerations

When we are designing the marketing caching for the site and stores, there are many options, enhancements, and best practices to consider for improving marketing performance. Before you design the marketing caching for the site, ensure that we are familiar with what can be cached, and how caching can improve your marketing activities. Within the site we can cache e-Marketing Spot JSP snippets, as well as entire JSP files. These objects can be cached within the following marketing-specific caches:

For more information about improving marketing performance with caching, see Improving marketing performance with caching. When we are designing how the site caches these objects and uses the available caches, consider the following available caches and techniques:


Marketing business object cache (DM_Cache)

The DM_Cache is used by WebSphere Commerce to cache all information that is related to an activity definition. The stored information includes the following activity information:

The default size for this cache is 2500 entries. We can increase this cache size to meet the site requirements. As a best practice for the site, ensure that the size of this cache matches the site requirements. If the site has more than 500 active activities, increase this cache size. When we are determining the required size of this cache for the site, assume that the store is recording five entries for each active Web activity. For more information about caching business objects, see marketing business object cache overview.


Marketing user behavior cache (DM_UserCache)

DM_UserCache caches the current user behavior information for shoppers. This information is a cached version of the online behavior for shoppers that is recorded in the database. The recorded online behavior includes experiment paths, categories that are browsed, products that are browsed, search terms used, URLs matched, and non-repeatable activities. As a best practice for the store, assess the required size of this cache for the site and if needed, change the cache size. If the store encounters high volumes of traffic, increase the size of the cache. The default size of this cache is 10000 entries. For more information about caching user behavior, see the MarketingUserCache section in Marketing business object cache overview.

As another best practice, ensure that the WebSphere Commerce instance is updated to the Fix Pack 2 level. If WebSphere Commerce Version 7 Fix Pack 2 is installed, the site can enable this cache to offload entries to disk to reclaim memory and improve performance. This cache is not capable of offloading entries to disk if WebSphere Commerce Fix Pack 2 is not installed.


Marketing services - user behavior

Your site can use marketing services to temporarily store user behavior information updates. Any change to user behavior information is first recorded in memory and then periodically persisted in a batch to the database. We can modify the batch size by setting our changes in the marketing component configuration file, wc-admin-component.xml. For more information about recording data, see data recording: improving runtime performance. As a best practice, use the default settings, which include a default batch size of 200.


Marketing services - marketing statistics

Your site can also use marketing services to temporarily store marketing statistics. The gathered statistics are initially recorded in memory and then periodically persisted to the database with the SaveMarketingStatistics scheduled job. For more information about changing the frequency of the SaveMarketingStatistics scheduled job, see marketing statistics for Management Center. As a best practice, use the default settings for the SaveMarketingStatistics scheduled job.

If we are not using the marketing statistics, we can disable the collecting of these statistics. See Disable marketing statistics


DynaCache marketing command cache

The DynaCache marketing command cache caches data that displays in e-Marketing Spots. This data includes catalog entries, categories, and store content information. The command cache cachespec can be used to cache queries that retrieve information from the database to display in the storefront e-Marketing Spots. As a best practice for the store, add the sample cachespec entries to the cachespec for the store. For more information about marketing command caching, see command caching for marketing.


Caching catalog hierarchy queries (WCMarketingDistributedMapCache)

Your site can use the WCMarketingDistributedMapCache cache to store information about catalog hierarchies. Many marketing activity targets and actions rely on determining whether a catalog entry belongs to a particular category. To determine the parent hierarchy for a catalog entry or category, database queries must retrieve the parent category information from the database. To reduce the load on the database, we can enable the WCMarketingDistributedMapCache cache to cache catalog hierarchy information. Enabling the caching of catalog hierarchy queries can improve the performance of the following campaign elements that use catalog hierarchy queries:

If the store uses any of these targets or actions, enable this cache as a best practice for the store. For more information about enabling the WCMarketingDistributedMapCache data cache, see WebSphere Commerce data cache.


Marketing (CampaignInitiativeCache) registry

The Marketing CampaingInitiativeCache registry keeps a mapping of an e-Marketing Spot name to the e-Marketing Spot primary key. This registry contains entries for e-Marketing Spots that are defined in the database and not defined in the database but that are still included on store pages. If the site fully caches e-Marketing Spot JSPs this registry provides no reuse. For this registry, each e-Marketing Spot is called only once and then the store JSP is cached. If the site fully caches e-Marketing Spot JSPs, we can disable this registry to prevent the memory usage of this registry for storing unnecessary cache entries.


Related concepts
Overview of e-Marketing Spot JSP caching based on activity behavior


Related tasks
Improving marketing performance by using caching
Setting up JSP snippet caching based on activity behavior
Disable marketing statistics