Sanity Library Reference Docs
    Preparing search index...
    sanity: { revalidate: 31536000 } = ...

    For usage with cacheComponents: true, and defineLive:

    // next.config.ts

    import type {NextConfig} from 'next'
    import {sanity} from 'next-sanity/live/cache-life'

    const nextConfig: NextConfig = {
    cacheComponents: true,
    cacheLife: {
    default: sanity,
    }
    }

    export default nextConfig

    Type declaration

    • Readonlyrevalidate: 31536000

      Sanity Live handles on-demand revalidation, so the default 15min time-based revalidation is too short