Azure Pipelines Cache@2 task interaction with self‑hosted agents and stale cache handling
The goal is to guarantee that any change to a file that influences the build—such as a version file stored outside the cached directories—forces the Cache@2 task to treat the cache as missed, thereby preventing the reuse of stale data that could produce non‑deterministic builds. On Microsoft‑hosted agents the cache is automatically removed after seven days o