cloudflare / cloudflare/vinext

Support revalidate = false for App route segment config

Open
#1,041 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8.8k
Forks
406
Avg merge
2d 6h
Merged PRs (30d)
120

Description

## Summary

Vinext currently ignores non-numeric App route segment `revalidate` exports while resolving effective segment config. Next.js accepts `export const revalidate = false` to mean cache indefinitely (effectively `Infinity`).

This is a pre-existing parity gap, but PR #993 makes it more visible because layout/page segment config is now reduced across the full route tree.

## Expected behavior

- A route whose only segment config is `revalidate = false` should produce an explicit indefinite-cache policy rather than `null`/unset.
- Mixed segment configs should preserve shortest-wins semantics: numeric intervals should win over `false` because any finite interval is shorter than `Infinity`.

## Current behavior

`resolveRevalidateSeconds()` ignores `false`, so `revalidate = false` alone is indistinguishable from no segment config.

## Notes

This likely needs a cache-layer representation for indefinite caching that is distinct from "unset" before the resolver can model this cleanly.

Contributor guide

Open the contributing guide

Research direction

Start at resolveRevalidateSeconds and trace how its result is represented and consumed by the cache layer. Implement a distinct indefinite-cache state for revalidate = false, while preserving shortest-wins behavior when numeric intervals are present; done means false alone is explicit rather than unset and finite values still take precedence.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
backend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.