Commit efcb607a authored by Mario Schünadel's avatar Mario Schünadel
Browse files

remove "restoreKeys" to clear cache after update

parent a12e082d
Loading
Loading
Loading
Loading
+2 −3
Changes for dist/cleanup/index.js: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -61868,9 +61868,8 @@ function restore(id) {
        if (primaryKey.endsWith('-')) {
            throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`);
        }
        const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [
            `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}`
        ]);
        // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
        const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey);
        if (matchedKey) {
            core.saveState(CACHE_MATCHED_KEY, matchedKey);
            core.info(`Cache restored from key: ${matchedKey}`);
+2 −3
Changes for dist/setup/index.js: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -18659,9 +18659,8 @@ function restore(id) {
        if (primaryKey.endsWith('-')) {
            throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`);
        }
        const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [
            `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}`
        ]);
        // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
        const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey);
        if (matchedKey) {
            core.saveState(CACHE_MATCHED_KEY, matchedKey);
            core.info(`Cache restored from key: ${matchedKey}`);
+2 −3
Changes for src/cache.ts: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -72,9 +72,8 @@ export async function restore(id: string) {
    );
  }

  const matchedKey = await cache.restoreCache(packageManager.path, primaryKey, [
    `${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}`
  ]);
  // No "restoreKeys" is set, to start with a clear cache after dependency update (see https://github.com/actions/setup-java/issues/269)
  const matchedKey = await cache.restoreCache(packageManager.path, primaryKey);
  if (matchedKey) {
    core.saveState(CACHE_MATCHED_KEY, matchedKey);
    core.info(`Cache restored from key: ${matchedKey}`);