Skip to content

Commit 07cfacf

Browse files
author
github-actions
committed
Documentation update
1 parent 2e0118d commit 07cfacf

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/migrations/migration8/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,15 @@ <h4 id="example-2---configuring-persisted-documents-with-the-options-class" styl
922922
<span class="token property">"id"</span><span class="token operator">:</span> <span class="token string">"1"</span>
923923
<span class="token punctuation">}</span>
924924
<span class="token punctuation">}</span></code></pre></div>
925+
<h4 id="caching-v830" style="position:relative;"><a href="#caching-v830" aria-label="caching v830 permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Caching (v8.3.0+)</h4>
926+
<p>The persisted document handler does not provide caching by default. You may implement your own caching mechanism
927+
within the <code class="language-text">GetQueryAsync</code> method to cache the query strings based on the document identifier. Alternatively, you
928+
may add the <code class="language-text">.UseMemoryCache()</code> method from the <code class="language-text">GraphQL.MemoryCache</code> package to enable in-memory caching. Be sure
929+
to call <code class="language-text">UseMemoryCache</code> before calling <code class="language-text">UsePeristedDocuments</code> to ensure that the cache is used.</p>
930+
<div class="gatsby-highlight" data-language="csharp"><pre class="language-csharp"><code class="language-csharp">services<span class="token punctuation">.</span><span class="token function">AddGraphQL</span><span class="token punctuation">(</span>b <span class="token operator">=></span> b
931+
<span class="token punctuation">.</span><span class="token function">UseMemoryCache</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
932+
<span class="token punctuation">.</span><span class="token generic-method"><span class="token function">UsePeristedDocuments</span><span class="token generic class-name"><span class="token punctuation">&lt;</span>MyLoader<span class="token punctuation">></span></span></span><span class="token punctuation">(</span>GraphQL<span class="token punctuation">.</span>DI<span class="token punctuation">.</span>ServiceLifetime<span class="token punctuation">.</span>Scoped<span class="token punctuation">)</span>
933+
<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre></div>
925934
<h3 id="24-execution-timeout-support" style="position:relative;"><a href="#24-execution-timeout-support" aria-label="24 execution timeout support permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>24. Execution timeout support</h3>
926935
<p><code class="language-text">ExecutionOptions.Timeout</code> has been added to allow a maximum time for the execution of a query. If the execution
927936
exceeds the timeout, the execution will be cancelled and a timeout error will be returned to the client. The default

page-data/docs/migrations/migration8/page-data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)