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

The caching technique that is based on activity behavior is provided to aid in the caching of e-Marketing Spots and to help improve storefront performance.

Previously, the marketing caching technique required the marketing engine to determine what information displays in an e-Marketing Spot. The marketing engine used the dynacache command cache and distributed map cache entries to cache the results that display in the e-Marketing Spot. This technique allowed the marketing engine to handle the dynamic aspects of marketing activities such as experiments, while it used cached entries wherever possible.

However, in practice, many e-Marketing Spots are static and display the same results to all customers. For a static e-Marketing Spot, JSP cache is the best caching technique. The e-Marketing Spot JSP fragment can be cached. If the e-Marketing Spot is on a fully cached page, then the e-Marketing Spot can be consumed by the parent page. Setting the e-Marketing Spots that can use a JSP cache requires continuous manual support.

The marketing caching technique that is based on activity behavior allows for optimal caching of e-Marketing Spots with no manual involvement. The marketing engine automatically detects if the e-Marketing Spot is static or dynamic. If the e-Marketing Spot is static, then JSP caching can be used for the e-Marketing Spot results. If the e-Marketing Spot is dynamic, then the marketing engine determines the content to display. The marketing engine then uses the dynacache command cache and distributed map cache entries to display the results. Configuration is set in the e-Marketing Spot JSP snippets and the store cachespec.xml file, then static e-Marketing Spots are automatically JSP cached.


Static and dynamic

A static e-Marketing Spot, at any time, schedules only those activities that display the same results to all customers. The activities do not contain targets, branches, or experiments. The activities can have specific start and end dates.

A dynamic e-Marketing Spot, at any time, has one or more scheduled activities whose behavior can depend on the current customer or the current context. These activities use targets, branches, and experiments.

An e-Marketing Spot can also be dynamic if the content displayed in the e-Marketing Spot is dynamic. Most content is static and the same content is displayed for all customers. In some situations, the content can have substitution variables or promotion proximity tags that change the content. For example, to display the customer name or the amount a customer further requires to receive a promotion. If the displayed content can change, then the e-Marketing Spot behavior is dynamic. The Marketing Manager is required to identify any content that has dynamic behavior. See Creating marketing content to display on store pages.


Invalidation

The wcf:eMarketingSpotCache tag dynamically sets dependency IDs for cached e-Marketing Spots. Many of these invalidations are automatically issued. The Quick Publish and Stageprop processes on the staging database creates entries in the CACHEIVL table on the production database. When the DynaCacheInvalidation scheduled job run on the production environment, then the dynacache invalidations are issued, and invalidates the appropriate dynacache entries. Invalidation is done for both cached JSP entries, and for the marketing distributed map cache. Invalidations are set up for the following scenarios:

Note: Invalidations are not configured for catalog entries or categories

A static e-Marketing Spot associated with a web activity that contains a Recommend Promotion action, invalidates at the activity start and end dates. The e-Marketing Spot JSP does not invalidate at the promotion start and end dates. For example, if the associated promotion is set to end before the activity ends, the e-Marketing Spot JSP cache does not invalidate when the promotion ends. The storefront e-Marketing Spot JSP continues to present the promotion. To ensure that the cached e-Marketing Spot JSP invalidates when the promotion begins and ends, set the activity start and end dates to match the promotion.


Caching

In the cachespec.xml file, the e-Marketing Spot JSP fragment has a cache entry. This cache entry specifies do-not-cache and do-not-consume to be true. However, these settings are only the default values; the actual values are set dynamically by the EMarketingSpotMetaDataGenerator when the page is loaded. When the page that contains the e-Marketing Spot JSP is first loaded, the EMarketingSpotMetaDataGenerator checks the behavior of the activities active on the e-Marketing Spot.

When the e-Marketing Spot JSP is being cached, the EMarketingSpotMetaDataGenerator dynamically sets the timeout of the page. The timeout is set to the earliest time from the following set of values:

This timeout allows the e-Marketing Spot JSP to be invalidated at activity transition times. When the page is reloaded, it is cached again with the updated relevant set of activities.

The e-Marketing Spot JSP page contains a wcf:eMarketingSpotCache tag. This tag dynamically sets dependency IDs on the cache entry. Dependency IDs are set for the e-Marketing Spot (ID or name). Dependency IDs can also be set for the data (catalog entry, category, content) that is being displayed in the e-Marketing Spot.

(

Note: There are optional configuration flags that can override the checking of the e-Marketing Spot behavior. These flags can also set if the page is to be consumed by the parent page)


Related tasks
Setting up JSP snippet caching based on activity behavior
Creating marketing content to display on store pages


Related reference
Marketing performance tuning
Marketing cache design considerations