Field Resolution Caching

1 domain
5 domains
25 domains




Buying the extension gives you a license for 1 year (renewable every year), that includes support and access to all extension updates. Prices are in USD.

🛍️ Buy “Field Resolution Caching” Extension

Addition of the @cache directive to the GraphQL schema, which stores the result from a field in disk for a requested amount of time. When executing the same field within that time span, the cached value is returned.

Add @cache to the field to cache in the GraphQL query, specifying for how much time (in seconds) must the result be cached.

This directive can boost performance when executing expensive operations (such as when interacting with external APIs), as we can cache and reuse their response.

Example permalink

The @strTranslate connects to the Google Translate API. By using @cache(time: 10), the translated value for the title field will be cached for 10 seconds, and executing the same query again within this time span will avoid connecting to Google Translate, resulting in a very fast resolution.

query {
posts(pagination:{ limit: 3 }) {
@strTranslate(from: "en", to: "es")
@cache(time: 10)

Bundles including extension permalink

Recipes using extension permalink

🛍️ Buy “Field Resolution Caching” Extension