Marketing cache design considerations

When you are designing the marketing caching for your site and stores, there are many options, enhancements, and best practices to consider for improving marketing performance.

Before you design the marketing caching for your site, ensure that you are familiar with what can be cached, and how caching can improve your marketing activities. Within your site you can cache e-Marketing Spot JSP snippets, as well as entire JSP files. These objects can be cached within the following marketing-specific caches:
  • Marketing Business Objects Cache
  • Marketing User Behavior Cache
  • WCMarketingDistributeMapCache
  • DynaCache Marketing Command Cache

For more information about improving marketing performance with caching, see Improving marketing performance with caching.

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 activity
  • The element information includes implementation, behavior, and related rules
  • Which activities are scheduled to an e-Marketing Spot
  • The default content that is assigned to an e-Marketing Spot
  • The ordering scheme that is assigned to an e-Marketing Spot
The default size for this cache is 2500 entries. You can increase this cache size to meet your site requirements. As a best practice for your site, ensure that the size of this cache matches your site requirements. If your site has more than 500 active activities, increase this cache size. When you are determining the required size of this cache for your site, assume that your 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 that are used, URLs matched, and non-repeatable activities. As a best practice for your store, assess the required size of this cache for your site and if needed, change the cache size. If your 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 your WebSphere Commerce instance is updated to the Fix Pack 2 level. If WebSphere Commerce Version 7 Fix Pack 2 is installed, your 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. You can modify the batch size by setting your 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 you are not using the marketing statistics, you can disable the collecting of these statistics. For more information, see Disabling 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 your store, add the sample cachespec entries to the cachespec for your 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 your database, you 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:
  • Shopping Cart Target
  • Purchase History Target
  • Catalog Browsing Behavior, Current Page (for catalog browsing behavior)
  • Merchandising Association Action
  • Top Browsed Action
  • Best Sellers Action
If your store uses any of these targets or actions, enable this cache as a best practice for your 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 your 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 your site fully caches e-Marketing Spot JSPs, you can disable this registry to prevent the memory usage of this registry for storing unnecessary cache entries.