From a2052966725535910251c62215cbeeb1d15032aa Mon Sep 17 00:00:00 2001 From: Martijn Date: Fri, 8 May 2026 10:26:26 +0200 Subject: [PATCH] Document cache exclusion for GraphQL responses Added section on cache exclusion for GraphQL responses. --- content/collections/pages/graphql.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/content/collections/pages/graphql.md b/content/collections/pages/graphql.md index b19bea23a..811756e4b 100644 --- a/content/collections/pages/graphql.md +++ b/content/collections/pages/graphql.md @@ -1654,6 +1654,20 @@ Cached responses are automatically invalidated when content is changed. Dependin ], ``` +### Cache exclusion + +Responses can be excluded from the whole-response cache by adding their query names to the `exclude` array in `config/statamic/graphql.php`. + +```php +'cache' => [ + 'expiry' => 60, + 'exclude' => [ + 'ping', + 'user', + ], +], +``` + ### Disabling caching If you wish to disable caching altogether, set `cache` to `false`.