Skip to main content

Module key

Module key 

Source
Expand description

What decides whether a cached result may be used.

The key is a hash over everything a file’s result depends on except its dependencies, which are checked separately (§8.2). Everything listed here is an input because leaving any of it out produces the same class of bug: a result computed by code, configuration or a grammar that no longer exists, served as though it were current.

Over-invalidation costs a recompute. Under-invalidation reports the wrong answer and gives no sign that it did. The two are not symmetric, which is why anything doubtful goes in the key.

Structs§

CacheKey
A cache key: what an entry is stored under.
GrammarKey
The grammar a file was parsed with.
RunKey
Everything about a run that every file’s key shares.

Constants§

FORMAT_VERSION
The on-disk format’s version.