Home / Companies / Apollo / Blog / Post Details
Content Deep Dive

Introducing Response Caching: GraphQL‑aware performance for your graph

Blog post from Apollo

Post Details
Company
Date Published
Author
Benjamin Coenen
Word Count
1,867
Language
English
Hacker News Points
-
Summary

Response caching has been introduced in the GraphOS Router to optimize GraphQL performance by reducing service load and improving latency. This new feature, a replacement for the older entity caching, is designed for federated GraphQL workloads and uses Redis as a backing store, allowing for both root-level and granular entity caching. It addresses the unique caching challenges in GraphQL, such as mixed TTLs and safe data sharing, by deriving TTLs from HTTP Cache-Control headers and supporting active invalidation through cache tags. A case study with Dow Jones demonstrates significant performance improvements, including reduced backend service load and improved response times. The feature is available on various GraphOS plans, requiring Router v2.10.0 or later, and includes tools for observability and debugging to ensure effectiveness. This new caching approach builds on previous entity caching work by integrating detailed cache key inspections and supporting Redis cluster deployments.