Was this page helpful?

Advanced caching

Introduction

Advanced caching allows the configuration of advanced cache serving behavior at the CDN level for Content Delivery API (CDA) and GraphQL Content API.

Advanced caching options

With advanced caching you can enable one or both of the following options:

  • Stale-when-rate-limited—When traffic is at a level where some requests get rate-limited (a rate-limit error HTTP status 429 is returned), stale data is sent instead of the 429 error response whenever possible (where stale content is available). Configuring this option is helpful when you publish frequently and have high traffic in general, while data freshness is not critical.
  • Stale-while-revalidate—During the first minute after a publish event, the cache returns stale data (when available), and the data is refreshed in the background. The extra time needed to refresh the content is not appearing in the response times. Configuring this option is helpful when you deal with many identical requests and low latency is more important than data freshness.

How to activate Advanced caching

Advanced caching is available only to Premium plan customers (and formerly Enterprise plans with Scale or High availability subscriptions).

Advanced caching is activated on a space level and configured individually per customer on the Contentful side. To activate advanced caching, file a ticket to support.