4 ms·
I rerender pages on demand like this, but also rerender the entire site every 6 hours. There's some computer science theorem that says tracking the dependency o
by etaioinshrdlu 6y ago
I rerender pages on demand like this, but also rerender the entire site every 6 hours. There's some computer science theorem that says tracking the dependency of which outputs are sensitive to which inputs is actually identical to solving the halting problem... i.e, no framework can actually track which pages are affected by which pieces of data. (This is true if you run custom code. If you are running in some type of limited non-Turing complete language it could be done.)
- Rauchg 6y agoIt's true that there will be a limit to what dependency tracking can do, because if you rename the nickname of an author of a blog post that is in 1,000,000 pages, then we'll fire 1,000,000 function invocations preemptively to recompute all pages. That's why Next.js is focused on enabling both eager and lazy pre-rendering behaviors (AOT and JIT). There is no silver bullet :)
- ec109685 6y agoAs long you as you track the data coming into the custom code, you can make it deterministic.