Engine API and Caching Rules

Online personalization is essential for creating a successful online presence. Site personalization involves gathering data about visitors' behavior, preferences, and even location to customize the content and the experience of the site. Personalization can help businesses to engage their online customers better while increasing conversions and building greater customer loyalty.

Personalization can conflict with caching technology intended to improve the performance of online applications. When a customer accesses a previously cached page, the content comes immediately from the cache rather than needing to be fetched from the server, which in turn improves the page load time.

Personalization in Engine API

Before the page has been rendered, a request is sent to Monetate from the client's server via the Engine API. In this request the client shares data captured about the visitor. The Engine API then processes this data and then sends a response to the client's server with a decision that the client's developers can then use to personalize the site for that visitor based on the data it was provided. This decision can support anything from changing text content on the site to calling a CMS, which then delivers content based on the data in the response.

For personalization to work with an Engine API implementation, the HTML elements that require personalization shouldn't be cached on the server to allow for a unique experience for each individual visitor.

Personalization and Caching

While online personalization and caching are both excellent tools for enhancing a visitor's experience, they don't necessarily work well together. Here are a few reasons why:

  • Personalized content is mostly dynamic and unique to each customer or customer segment, making it difficult to cache. Because personalized content is tailored to individual customers based on their preferences and behavior, it's often unique and dynamic. This means that caching personalized content can be challenging, as each customer's experience is different and may require different resources.
  • Because cached content is not personalized, it provides a less-engaging customer experience. When pages are cached, the content is saved as a static copy on the server. This means that personalized content, such as product recommendations, user-specific data, or dynamic elements, may be missing from the cached version. As a result, customers may encounter a less-appealing and -relevant version of the site.
  • Personalization likely leads to more server requests, making caching less effective. Because personalized content is unique to each customer, it often requires additional server requests to fetch the relevant data. This can increase the load on the server and make caching less effective because the cache may need to be updated frequently to accommodate the personalized content.

To balance the benefits of both personalization and caching, Monetate clients should carefully consider their options and use a mix of caching and personalized content as appropriate for their customers' needs. One method of doing this is by configuring caching rules.

Caching Rules

Caching rules is a technology for balancing site personalization and caching. Configuring caching rules can help in the following ways:

  • Define what content to cache. By defining which elements or pages of a site's content should and shouldn't be cached, caching rules can help ensure that personalized content isn't cached and static content is cached. This guidance can be helpful when working with large assets such as images and videos that don't need to be personalized. This approach can potentially improve each visitor's experience by serving cached content quickly and efficiently while also allowing for personalized content to be dynamically generated and served as needed.
  • Set cache expiration times. Caching rules can be used to set expiration times for cached content. By setting expiration times, site owners can control how long content is cached before it's refreshed from the server. This approach can help ensure that personalized content is always up to date while still allowing for efficient caching of static content.
  • Use cache tagging. Cache tagging involves adding tags to cached content to help identify it. This approach can be particularly useful for personalization because it can help ensure that personalized content isn't cached for other customers. By tagging cached content with information such as the customer's ID or session information, Monetate clients can ensure that personalized content is only served to the appropriate customer.
  • Use cache invalidation. When cached content is no longer required, it's removed through cache invalidation. Cached content can be removed when it's updated or when it expires using cache invalidation rules that can usually be set up in caching rules config. This strategy can help ensure that personalized material is always current and is delivered to the right customer.

While personalization doesn’t adhere well to cached systems without the use of technologies such as caching rules, the client must decide whether or not to use the data that the Engine API provide. This data may also be used in other ways, such as for collecting analytics to support overall business goals.