Skip to content

feed.xml sets both force-dynamic and revalidate, so the revalidate never applies #55

Description

@royalpinto007

app/feed.xml/route.ts declares both of these at the top of the file:

export const dynamic = "force-dynamic";
export const revalidate = 3600;

They contradict each other. force-dynamic opts the route out of caching entirely, so the revalidate = 3600 is dead code and the RSS feed is regenerated from Supabase on every single request, including every poll from every feed reader. The comment-free pairing also reads as if the feed is cached hourly, which it is not.

Pick one and delete the other:

  • If the intent was an hourly cached feed, drop dynamic = "force-dynamic" and keep revalidate = 3600.
  • If the intent was always-fresh, drop revalidate and keep force-dynamic.

The hourly cache is almost certainly what was meant, given a case has to be approved by a maintainer before it can appear.

Worth checking app/sitemap.ts in the same pass, which also sets export const dynamic = "force-dynamic" and rebuilds from the database on every crawl.

Where to start: app/feed.xml/route.ts, lines 4 and 5. Verify with npm run dev and a request to http://localhost:3000/feed.xml, then run npx prettier --check ., npm run lint, npx tsc --noEmit and npm run build.

If you would like to take this on, comment here to claim it. Contributors can hold two open claims at a time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions