Skip to main content

Module cache

Module cache 

Source
Expand description

Disk cache for version calculation results.

Corresponds to GitVersion.Core/VersionCalculation/Caching. Caches results under <.git>/gitversion_cache/<key>.json, keyed by a SHA1 hash of the repository state (refs + HEAD), config file content, and overrideconfig values. The cache is automatically invalidated when the repository state or config changes.

Functions§

compute_key
Compute cache key: SHA1 hex of (refs snapshot + HEAD + config file content + overrideconfig).
load
Load variables from cache. Returns None if missing or corrupt (deletes corrupt entries).
store
Write variables to the cache.