diff --git a/dist/restore/index.js b/dist/restore/index.js
index a840efa..5a803e8 100644
--- a/dist/restore/index.js
+++ b/dist/restore/index.js
@@ -4947,6 +4947,7 @@ var Inputs;
     Inputs["Path"] = "path";
     Inputs["RestoreKeys"] = "restore-keys";
     Inputs["UploadChunkSize"] = "upload-chunk-size";
+    Inputs["StrictRestore"] = "strict-restore";
 })(Inputs = exports.Inputs || (exports.Inputs = {}));
 var Outputs;
 (function (Outputs) {
@@ -48995,6 +48996,10 @@ function run() {
             utils.setCacheState(cacheKey);
             const isExactKeyMatch = utils.isExactKeyMatch(primaryKey, cacheKey);
             utils.setCacheHitOutput(isExactKeyMatch);
+            if (!isExactKeyMatch && core.getInput(constants_1.Inputs.StrictRestore) == "true") {
+                core.info("Cache with exact key not found, hence exiting the workflow as strict-restore is set to true");
+                return;
+            }
             core.info(`Cache restored from key: ${cacheKey}`);
         }
         catch (error) {
diff --git a/dist/save/index.js b/dist/save/index.js
index 6bf1854..8f63267 100644
--- a/dist/save/index.js
+++ b/dist/save/index.js
@@ -4947,6 +4947,7 @@ var Inputs;
     Inputs["Path"] = "path";
     Inputs["RestoreKeys"] = "restore-keys";
     Inputs["UploadChunkSize"] = "upload-chunk-size";
+    Inputs["StrictRestore"] = "strict-restore";
 })(Inputs = exports.Inputs || (exports.Inputs = {}));
 var Outputs;
 (function (Outputs) {