Unverified Commit 263f8417 authored by Daz DeBoer's avatar Daz DeBoer
Browse files

Prefix cache key with protocol version

This will ensure that incompatiblee cache entries generated by previous action releases
will not be used.
parent 0eb59965
Loading
Loading
Loading
Loading
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Changes for src/cache-utils.ts: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -18,8 +18,8 @@ export function isCacheDebuggingEnabled(): boolean {
}

function generateCacheKey(cacheName: string): CacheKey {
    // Prefix can be used to force change all cache keys
    const cacheKeyPrefix = process.env['CACHE_KEY_PREFIX'] || ''
    // Prefix can be used to force change all cache keys (defaults to cache protocol version)
    const cacheKeyPrefix = process.env['CACHE_KEY_PREFIX'] || 'v2-'

    // At the most general level, share caches for all executions on the same OS
    const runnerOs = process.env['RUNNER_OS'] || ''