From 69bc4a984c5e547628ae77e4b935d7f183bed976 Mon Sep 17 00:00:00 2001 From: Rico Kahler Date: Fri, 18 Dec 2020 04:40:59 -0500 Subject: [PATCH] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 0b75ceb7..f1adeabc 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,8 @@ export default createClient({ previewMode: true, // (optional) only required if your dataset is private or if you want to use preview mode token: '...', + // by default sanity-codegen caches responses in memory. this can be disabled if desired + // disabledCache: true, }); ``` @@ -140,6 +142,12 @@ function expand(ref: SanityReference): Promise; * provided by you. */ function query(query: string): Promise; + +/** + * Clears the in-memory cache. The cache can also be disabled when creating + * the client + */ +function clearCache(): void; ``` The design behind the client is to fetch full documents and handle projections and transforms in code.