next.js
9a12f639 - [Segment Cache] Add CacheStatus.Empty (#73667)

Commit
1 year ago
[Segment Cache] Add CacheStatus.Empty (#73667) This is a small refactor to allow creating a cache empty entry without also triggering a server request. Currently these are combined into the same phase, because there's no case where one operation happens without the other. However, I need to implement additional prefetching strategies. For example, sometimes a segment's data will already be available as part of a different server response. To support this, I've split the Pending CacheStatus into two separate fields: - Empty: The cache entry has no data, and there's no pending request to fetch it. - Pending: The cache entry has no data, and there _is_ a pending request to fetch it. This is a refactor only, so there should be no change to external behavior.
Author
Parents
Loading