About Edge Caching

Stellate Edge Caching is a core product offered by Stellate, a company that enhances the capabilities of GraphQL APIs. It is a programmable edge GraphQL Gateway designed to sit in front of an API, providing caching solutions to improve performance and reduce load. Stellate Edge Caching is trusted by leading companies and can be added to any GraphQL API.

The Stellate Edge Caching system is part of the Stellate GraphQL Edge Suite, which also includes GraphQL Metrics, GraphQL Security, and GraphQL Rate Limiting, providing a comprehensive set of tools for optimizing and securing GraphQL APIs.

An image displaying Edge Caching insights

Benefits of Edge Caching

The primary benefits of using Stellate Edge Caching include speeding up API response times through caching, reducing the load on your origin server, the ability to implement configurable caching rules, and understanding caching specific metrics that help you optimize your cache hit rate. Edge Caching helps make GraphQL implementations fast, stable, and cost-effective.

Stellate Edge Caching Features

Stellate's GraphQL Edge Cache allows you to configure caching for your GraphQL API in a few key ways. You can define scopes to cache data differently for authenticated vs. unauthenticated users. You can also specify types or fields that should never be cached. Once configured, Stellate will automatically cache responses based on your rules, providing a significant performance boost by serving cached data from the edge instead of hitting your origin server. Stellate also offers advanced features like Partial Query Caching, which can split queries into optimally cached parts, as well as tools like CacheGuard to preview the impact of configuration changes before deploying them.

Guides to Edge Caching Configuration Features

Configuring Stellate edge caching is straightforward with several options to fine tune your caching experience.

  • Cache Rules: Offers fine-grained control over cache behavior for every query sent through the service.
  • Scopes: Scopes allow you to split the cache into different buckets based on headers, cookies, or a combination of both. This is useful for caching data that is specific to an authenticated user and can prevent inadvertant sharing of cached information
  • Key Fields: Key Fields enable you to identify fields that uniquely identify resources in your schema, so it can purge changed results from the cache
  • Cache Directives: Enables the definition of cache rules directly within the GraphQL schema using the stellate_cache directive.
  • Cache Insights: Automatically provides caching metrics, allowing for a gradual adoption of Edge Caching by analyzing GraphQL traffic.
  • Cache Status: The cache statuses in Stellate's GraphQL Edge Cache are indicators of how a request interacts with the cache.

Guide to Edge Cache Invalidation and Management Features

  • Purging API: Automatically creates a custom GraphQL API for each service to purge the cache.
  • Cache Invalidation Methods: Provides multiple methods for invalidating the cache to ensure data is delivered quickly.
  • Cache Lists Invalidation: Provides insights into why a list of resources might not be getting purged automatically. It let's you use the Purging API to manually invalidate lists that might not be invalidated automatically.
  • Bypass the Cache: You can bypass the Stellate Edge Cache for specific requests by including bypass cache headers in your GraphQL request.
  • Debug the Cache: Stellate provides a debug header called gcdn-debug that returns additional information about the request in the response headers, helping you understand why a request was not cached.
  • Optimize the Cache Hit Rate: Stellate provides various features like Automatic Cache Invalidation, Purging API, and fine-grained Cache Rules to help you maximize your cache hit rate, which can reduce load on your backend and improve response times.
  • Response Tagging: Stellate tags cached responses with metadata like the query, types, and key fields to enable efficient cache invalidation.
  • CacheGuard: Offers change management tools to assess the impact of changes on cache effectiveness.

Guides to Enhanced Caching Features

  • Partial Query Caching: Splits queries into multiple separate entries for optimal caching.
  • Partial Query Caching Configuration: Enables you to set up Partial Query Caching for your Stellate service.
  • Partial Query Caching Cookbook: Contains Mini-guides to help you solve common use-cases with Partial Query Caching.
  • Partial Query Caching Defer: The defer directive in GraphQL allows clients to deprioritize the marked data of a query, which is then streamed back after the critical data has been sent first. This can improve query latency by enabling the return of cached data to the client even before an origin request is made.

Discover more