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.