Expand description
The per-checkout cache behind the version check.
The check runs from the project’s shell entry, which fires on every directory entry. It reads this cache and nothing else, unless a refresh is due. A refresh is due seven days after the last success, or one hour after a failed attempt, and it runs under a lock beside the cache so two shells read the network once.
Structs§
- Entry
- What the cache records for one checkout.
- Lock
- A held refresh lock: an advisory lock on the lock file, which closing the file releases, and which the kernel releases when a process dies. The lock file itself stays in place.
Constants§
- REFRESH_
AFTER - How long a success holds before the next refresh is due.
- RETRY_
AFTER - How long a failed attempt holds before the next refresh is due.
Functions§
- due
- Whether a refresh is due at
now. - lock_
path - The lock beside one cache file.
- path
- Where the cache for one target lives under the cache root.
- read
- The entry the cache records, where one is readable.
- retired_
stamps - The retired daily stamps under the state root: every
*.stampfile in the stamp folder, and nothing else. - try_
lock - Take the refresh lock, or learn that another check holds it.
- write
- Record one entry.