Skip to content
This repository has been archived by the owner on Feb 21, 2025. It is now read-only.

Commit

Permalink
Prefix cache key with protocol version
Browse files Browse the repository at this point in the history
This will ensure that incompatiblee cache entries generated by previous action releases
will not be used.
  • Loading branch information
bigdaz committed Oct 16, 2021
1 parent 0eb5996 commit 263f841
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/post/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/cache-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'] || ''
Expand Down

0 comments on commit 263f841

Please sign in to comment.