Caching the introspection query
We're excited to announce a much-requested feature upgrade that we believe will significantly enhance your experience with our Stellate service. We're now providing the ability to cache introspection queries.
Here's how it works:
We have introduced a new configuration option:
cacheIntrospection. This option allows you to set whether or not you want your introspection queries cached. You simply have to assign a boolean value to this option -
true for enabling caching and
false for disabling it.
Once enabled, your introspections will be cached for a duration of one hour, with a stale-while-revalidate policy of one day. This means your queries will be instantly available for an hour, and even after that, the old data will still be served while the cache revalidates in the background, making sure your applications are never interrupted.
A key benefit of this feature is that it automatically manages cache invalidation. Whenever a new schema is pushed, the cache will be invalidated automatically, ensuring the latest data is always available.
For new Stellate service users, the
cacheIntrospection option will be enabled by default in your configuration. But if you're an existing user, no worries! You can easily turn on this feature by adding
cacheIntrospection: true to your config.