From 2044272ede6586ffdc6093f4f27a56d3b9f92fbc Mon Sep 17 00:00:00 2001 From: Byron Matto Date: Thu, 18 Jul 2024 11:06:02 -0400 Subject: [PATCH] Update docs with correct cachig config information --- docs/reference/data-fetching.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/reference/data-fetching.md b/docs/reference/data-fetching.md index fb3e7ff..00564ad 100644 --- a/docs/reference/data-fetching.md +++ b/docs/reference/data-fetching.md @@ -150,7 +150,7 @@ Cache "keys" are based on the following: Knowing this, if you hadn't made changes to any data flowing into the module, but still wanted to bust the cache, a new project build would suffice. -The `cacheConfig` property that is returned from `getServerSideProps` currently has one property `cacheControl`. This represents the `Cache-Control` header, and the properties can be any of the standard directives. +The `caching` property that is returned from `getServerSideProps` currently has one property `cacheControl`. This represents the `Cache-Control` header, and the properties can be any of the standard directives. ```typescript import { withModuleProps } from 'path/to/helpers'; @@ -160,12 +160,12 @@ const fetchData = async (props: ModulePropsWithoutSSP) => { const results = await fetch(...).then(response => response.json()) return { - serverSideProps { - results, - cacheConfig: { - cacheControl: { - maxAge 60 - } + serverSideProps: { + results + }, + caching: { + cacheControl: { + maxAge: 60 } } }