Configuring in-memory caching of GraphQL requests
Aside from the main embedded caching of published content on the server, Content Delivery also lets you configure an in-memory cache, specifically used to cache GraphQL requests.
About this task
Procedure
- Enable in-memory caching of GraphQL requests by ensuring that the property
graphql.request.caching.enabledresolves to the valuetrue. - Configure the maximum amount of time between requests, in milliseconds, below which in-memory caching is triggered, by ensuring that the property
graphql.request.caching.buffer.timeresolves to that number. This property defaults to the value 2000. - Configure the size of the cache, in number of items, by ensuring that the property
graphql.request.caching.capacityresolves to that number. This property defaults to the value 10. - Configure the TTL (time to live) of the items in the cache, in seconds, by ensuring that the property
graphql.request.caching.ttlresolves to that number. This property defaults to the value 60.