Skip to content

Commit e078c89

Browse files
authored
Add documentation for exclusion from GraphQL cache
Related PR: statamic/cms#14391
1 parent ea78ef7 commit e078c89

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

content/collections/docs/graphql.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,20 @@ GraphQL uses a basic whole-response cache by default. Each query/variables combi
15891589
],
15901590
```
15911591

1592+
### Cache exclusion
1593+
1594+
Responses can be excluded from the whole-response cache by adding their query names to the `exclude` array.
1595+
1596+
```php
1597+
'cache' => [
1598+
'expiry' => 60,
1599+
'exclude' => [
1600+
'ping',
1601+
'user',
1602+
],
1603+
],
1604+
```
1605+
15921606
### Cache invalidation
15931607

15941608
Cached responses are automatically invalidated when content is changed. Depending on your GraphQL usage and blueprint schema, you may also wish to ignore specific events when invalidating.

0 commit comments

Comments
 (0)