When using 'actions/cache', what happens if no cache entry matches the primary key?
Select an answer to reveal the explanation.
Short Explanation and Infographic
A cache miss isn't a failure — it tries restore-keys as fallbacks, then runs the job normally. The cache gets saved at the end for next time.
Full explanation below image
Full Explanation
actions/cache has a two-phase design: restore and save. On a cache miss for the primary key, it attempts restore-keys in order (partial matches). If no restore-keys match, the job continues without cache. After the job completes successfully, actions/cache saves a new cache entry with the primary key. This means the first run (cold start) always runs without cache benefit, but subsequent runs with matching keys get the cache hit. The workflow never fails due to cache misses. Geographic routing is not a user-configurable feature of the cache action.