Skip to content

Commit b196210

Browse files
committed
separate caching introspection section
1 parent 22142ab commit b196210

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

guides/object_cache/caching.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,10 @@ None of the _specific_ `Player`s will be part of the cached response, but the `T
7676
If a list may be sorted, then updates to `Player`s should also update the `Team` so that any sorted results in the cache are invalidated, too. Alternatively (or additionally), you could use a `ttl:` to expire cached results after a certain duration, just to be sure that results are eventually expired.
7777

7878
By default, connection-related objects (like `*Connection` and `*Edge` types) "inherit" cacheability from their node types. You can override this in your base classes as long as `GraphQL::Enterprise::ObjectCache::ObjectIntegration` is included in the inheritance chain somewhere.
79+
80+
## Caching Introspection
81+
82+
By default, introspection fields are considered _public_ for all queries. This means that they are considered cacheable and their results will be reused for any clients who request them. When {% internal_link "adding the ObjectCache to your schema", "/object_cache/schema_setup#add-the-cache", %}, you can provide some options to customize this behavior:
83+
84+
- `cache_introspection: { public: false }` to use [`public: false`](#public) for all introspection fields. Use this if you hide schema members for some clients.
85+
- `cache_introspection: false` to completely disable caching on introspection fields.

guides/object_cache/schema_setup.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ end
2323

2424
See the {% internal_link "Redis guide", "/object_cache/redis" %} for details about configuring cache storage.
2525

26-
Additionally, it accepts some options for customizing how introspection is cached:
27-
28-
- `cache_introspection: { public: false }` to use {% internal_link "`public: false`", "/object_cache/caching#public" %} for all introspection fields. Use this if you hide schema members for some clients.
29-
- `cache_introspection: false` to completely disable caching on introspection fields.
26+
Additionally, it accepts some options for customizing how introspection is cached, see {% internal_link "Caching Introspection", "/object_cache/caching#caching-introspection" %}
3027

3128
## Context Fingerprint
3229

0 commit comments

Comments
 (0)