next.js
5195704e - Track navigation timestamp on CacheNode (#77251)

Commit
269 days ago
Track navigation timestamp on CacheNode (#77251) Adds a field `navigatedAt` to the CacheNode type. It represents the timestamp of the navigation that last updated the CacheNode's data. This will be used to implement the `staleTimes.dynamic` configuration option, which allows dynamic data to be stale in the UI up to the given threshold. This first PR adds the field without changing any behavior. Originally I was going to call this `requestedAt`, but I have intentionally chosen not to distinguish between whether the data was fetched from the network or from the prefetch cache. This means that even fully static data will respect the `staleTimes.dynamic` configuration option. In practice, this only matters if the dynamic stale time is longer than the static one, although usually static stale times will be larger anyway.
Author
Parents
Loading