Skip to content

Fetching / Revalidation #16

@jastaffen

Description

@jastaffen

Hi there! Thank you for building this boilerplate. It's very comprehensive and fully helped me organize / structure my project in a way that I feel looks very clean and elegant.

I have 2 concerns / questions really:

I was wondering how the revalidate tags are meant to work here. I have a groq-powered webhook firing any time something a sanity document is published (or deleted) that then leverages the revalidateTag method in a route handler. The logs in Vercel apear to be showing correct data, but my frontend still has stale data. I'm not sure if I'm missing something in the docs, but figured I'd ask here if you had any advice seeing how masterful you are with the next-sanity package.

Secondly, I see that you're making an API call to Sanity once for data and again in generateMetadata methods. Is this calling the Sanity API twice or is the call itself somehow being cached so it doesn't call it twice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❓ questionFurther information is requested🎓 docsImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions