Expand description
The version check the .envrc line runs on every directory entry.
It reads one cache file per checkout and reads the network only when a refresh is due: seven days after the last success, or one hour after a failed attempt. A due refresh takes an OS file lock beside the cache first; a check that finds the lock held reads the cache it has, because another process is refreshing. It writes no file but its cache and the lock beside it, and it never moves a pin.
Structs§
- Cache
- One checkout’s cached answer.
- Paths
- The cache and its lock for one checkout.
- Run
- What one run of the check found.
Enums§
- Outcome
- What one check did.
Constants§
- RETRY_
INTERVAL - How long a failed attempt waits before the next one.
- SUCCESS_
INTERVAL - How long a success stays fresh.
Functions§
- due
- Whether the cache asks for a network read at
now. - next_
try - When the next attempt after a failure may read the network.
- read
- The cache at
path, orNonewhere it is absent or unreadable. - run
- Run the check for one checkout: read the cache, and refresh it where a refresh is due and the lock is free.
- stamp
- RFC 3339 UTC to the second.
- warnings
- The warnings one check prints, from the cache it read, for the pin
pin.