Skip to content

How updates arrive

When you publish in Geoffy, your page picks the change up on its own within the revalidate window — one hour by default, set by revalidateSeconds on the options object of each helper.

Your page is never permanently stale, and there is nothing that can be lost or misconfigured to make it so. That is the whole design: self-healing by default.

Mount the revalidate route, and we call it the moment you publish.

app/api/geoffy/revalidate/route.ts
import { revalidateTag } from "next/cache";
import { createGeoffyRevalidateRoute } from "@geoffy/headless/next";
export const POST = createGeoffyRevalidateRoute({
secret: process.env.GEOFFY_REVALIDATE_SECRET!,
revalidateTag,
});

Pass revalidateTag bare, and do not wrap it. Next 16 gives it a second argument — a cache-life profile — and the package supplies that for you: { expire: 0 }, which is Next’s own guidance for an invalidation arriving from outside a Server Action. The config type takes the profile as optional, so Next 15’s one-argument revalidateTag and Next 16’s two-argument one are both assignable unwrapped.

Do not pass a profile of your own. The profile does not say how long to keep the data — it says how long stale content may still be served while the refresh runs behind it. So "max", which Next’s own examples recommend, means the first visitor after you publish is served the pre-publish page. That is the delay this route exists to remove.

The secret is minted by Geoffy, not chosen by you. Copy it from your site’s settings into GEOFFY_REVALIDATE_SECRET, and rotate it there whenever you like — rotating shows you the new value once.

The request carries a signature over the body, which the route above verifies for you.

A raw secret could be replayed, and a redirect on your endpoint would forward it to a third origin. Signing the body also means a captured header cannot be reused for a different product.

Not a degraded one. Your pages still refresh within the window, and a failed call is logged and ignored rather than failing the publish. The only thing you give up is the difference between seconds and up to an hour.

Only what changed. Publishing one product refreshes that product’s page; publishing a guide or mounting the namespace refreshes the surfaces that list it. The helpers tag their own cache entries and the route purges the right ones for you — there is nothing to wire up and no tag for you to name.

Every publish, a product or a guide, also refreshes llms.txt, llms-full.txt and agents.md, because that document lists both. It refreshes the list of published products that <GeoffyProduct> reads too, so a newly published product appears on the next request. Without this route, a new product or guide can take up to the revalidate window to appear.