Layers, Types, and Considerations for Content Delivery Caching with Headless Content Management

This blog post contains information about layers and types of caches in content delivery tiers of headless content management systems. For the purposes of this blog post, features such as edge caches and CDNs are considered as a single layer.

While the internals of content management tiers of headless content management systems doubtless leverage database and local storage caches and possibly the same binary media caches used for content delivery, from a developer’s perspective, a headless content management system acts as a sort of black box that exposes only services (including webhooks), making these details irrelevant. Use caches for caching data from content management are uncommon. Caching in the content management environment is far less significant than caching in the content delivery environment. What is important is that the CMS vendor provides edge caching for content delivery services including text and binary media post server-side manipulations of images.

Caches are generally layered. For example, a browser’s in-memory cache of media also stored in its persistent cache retrieved from a CDN cache of binary media that depends on a cached content delivery endpoint supported by a service that may cache the binary content of an image transformed from the original that may also be cached, likely using similar caching layers.

Caches can be combinational in that a single document from a search index may contain values from multiple upstream systems.

Caches can be cumulative both in that they grow over time and that the browser cache can contain CSS, media, JavaScript, WebAssembly, and other resources from CDNs hosting public and trusted libraries and other resources, allowing multiple sites to share cached resources.

Excessive caching can increase costs and in rare cases can even reduce performance.

Within a single solution, there are at least four logical types of caches for data retrieved from content delivery services.

  • Any type of build or export process that stores anything retrieved from any content delivery service, such as generating HTML or storing static JSON to any media including systems intended for caching.
  • Store retrieved raw or transformed JSON as simple strings.
  • Transform retrieved JSON to platform storage, which can also include layers such as caching strongly typed objects based on data in simpler generic objects that assist in parsing JSON that depend on data unlikely to be cached as simple strings.
  • Store HTML, JSON, or other format generated at runtime by an application or service from data retrieved from a content delivery service.

Even within a single content delivery system these may be combinational. For example, you could deploy JSON files containing data from the CMS to an application service in the content delivery tier that caches them as strings as well as

The impact of publishing is a fundamental consideration for cache management, from content delivery services all the way through to browser caches. CMS vendors manage caches for content delivery services. Customers use different strategies to manage different types of caches of data retrieved from content delivery endpoints. Solutions may need to address synchronization and other caching concerns involving search indexes and other downstream caches.

As mentioned previously, the CMS vendor provides a content delivery network for text and transformed media. For web solutions, there are at least four logical places where data retrieved from content delivery services may exist.

Locations of various potential caches
  1. Cached data from content delivery services may appear artifacts generated by build processes, such as static files and mobile apps.
  2. Browsers maintain caches of data retrieved from the websites that they access. Solutions do limited control of browser caches.
  3. Internet search engines maintain caches of data retrieved from the websites that they access.
  4. Customer solutions may cache data from content delivery services at runtime in any number of ways.
  • Export processes, such as to synchronize a database or file system including continuous integration systems.
  • Build processes, such as to generate HTML or a mobile app.
  • Caching technologies used by applications managed by the customer, such as a dynamic ASP.NET Core website or HTTPS services.
  • Edge caching networks entire websites or components.
  • Search indexes populated with data from content delivery services including webhooks.
  • Data stored to event management and similar systems, such as converting CMS webhooks to system messages.

Solutions have limited control over browser caches (including bookmarks, which are cached URLs) and external search indexes. Some of the most critical elements of these caches include URLs, titles, and descriptions, where URLs should generally change and redirect as little as possible.  

If you have additional perspectives about caching with headless content management systems, please comment on this blog post.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: