diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js
index 478fd5ed..12ea09fe 100644
--- a/dist/cache-save/index.js
+++ b/dist/cache-save/index.js
@@ -37234,18 +37234,17 @@ class CacheDistributor {
             core.saveState(State.CACHE_PATHS, cachePath);
             core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey);
             const matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey);
-            this.handleMatchResult(matchedKey);
+            this.handleMatchResult(matchedKey, primaryKey);
         });
     }
-    handleMatchResult(matchedKey) {
-        if (matchedKey) {
+    handleMatchResult(matchedKey, primaryKey) {
+        if (matchedKey == primaryKey) {
             core.saveState(State.CACHE_MATCHED_KEY, matchedKey);
             core.info(`Cache restored from key: ${matchedKey}`);
         }
         else {
             core.info(`${this.packageManager} cache is not found`);
         }
-        core.info('cache was hit');
         core.setOutput('cache-hit', Boolean(matchedKey));
     }
 }
diff --git a/dist/setup/index.js b/dist/setup/index.js
index fc44f28d..b7c14185 100644
--- a/dist/setup/index.js
+++ b/dist/setup/index.js
@@ -42579,18 +42579,17 @@ class CacheDistributor {
             core.saveState(State.CACHE_PATHS, cachePath);
             core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey);
             const matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey);
-            this.handleMatchResult(matchedKey);
+            this.handleMatchResult(matchedKey, primaryKey);
         });
     }
-    handleMatchResult(matchedKey) {
-        if (matchedKey) {
+    handleMatchResult(matchedKey, primaryKey) {
+        if (matchedKey == primaryKey) {
             core.saveState(State.CACHE_MATCHED_KEY, matchedKey);
             core.info(`Cache restored from key: ${matchedKey}`);
         }
         else {
             core.info(`${this.packageManager} cache is not found`);
         }
-        core.info('cache was hit');
         core.setOutput('cache-hit', Boolean(matchedKey));
     }
 }
diff --git a/src/cache-distributions/cache-distributor.ts b/src/cache-distributions/cache-distributor.ts
index c939ec2e..4aaba033 100644
--- a/src/cache-distributions/cache-distributor.ts
+++ b/src/cache-distributions/cache-distributor.ts
@@ -1,6 +1,5 @@
 import * as cache from '@actions/cache';
 import * as core from '@actions/core';
-import {PromiseReturnType} from '../utils';
 
 export enum State {
   STATE_CACHE_PRIMARY_KEY = 'cache-primary-key',
@@ -42,19 +41,16 @@ abstract class CacheDistributor {
       restoreKey
     );
 
-    this.handleMatchResult(matchedKey);
+    this.handleMatchResult(matchedKey, primaryKey);
   }
 
-  public handleMatchResult(
-    matchedKey: PromiseReturnType<typeof cache.restoreCache>
-  ) {
-    if (matchedKey) {
+  public handleMatchResult(matchedKey: string | undefined, primaryKey: string) {
+    if (matchedKey == primaryKey) {
       core.saveState(State.CACHE_MATCHED_KEY, matchedKey);
       core.info(`Cache restored from key: ${matchedKey}`);
     } else {
       core.info(`${this.packageManager} cache is not found`);
     }
-    core.info('cache was hit');
     core.setOutput('cache-hit', Boolean(matchedKey));
   }
 }
diff --git a/src/utils.ts b/src/utils.ts
index f0dca7e1..eb3a1ba6 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -119,12 +119,3 @@ export function isCacheFeatureAvailable(): boolean {
 
   return true;
 }
-
-// Awaited (typescript 4.5+) polyfill. Not ideal, so use with care
-export type AwaitedPolyfill<T> = T extends PromiseLike<infer U>
-  ? AwaitedPolyfill<U>
-  : T;
-// Extract return type from promise
-export type PromiseReturnType<
-  T extends (...args: any) => any
-> = AwaitedPolyfill<ReturnType<T>>;