Tag-Based Revalidation of Server Component Queries
Unanswered
West African Lion posted this in #help-forum
West African LionOP
Context: We are using Sanity + NextJS with Tag-Based revalidation to update pages. Some pages have blocks on them that do not pull data as part of the page GROQ query, but instead are server components running their own queries (e.g. Location Block that displays information from a separate LocationSettings Sanity document). The page (other blocks, the ordering of the blocks, etc) revalidates very quickly based off its slug and the Sanity Webhook call as described here https://github.com/sanity-io/next-sanity.
Issue: The server components that run a query separate from the top-level page query (like the aforementioned Location Block) are not revalidating. Is tag-based revalidation meant to work in server components? If so, is there any unique setup that needs to be done or should they work exactly like the page-level queries?
Current Workaround: Setting
Issue: The server components that run a query separate from the top-level page query (like the aforementioned Location Block) are not revalidating. Is tag-based revalidation meant to work in server components? If so, is there any unique setup that needs to be done or should they work exactly like the page-level queries?
Current Workaround: Setting
cache: no-store on the page-level query seems to cause the server components to update correctly, or probably more accurately never be cached in the first place. Are there downsides to this approach in terms of speed/Vercel usage?