From 6c515460d7384db84988f3b1dc53c2b956f09aa6 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 5 Oct 2023 17:33:04 +0200 Subject: [PATCH] fix(cache): allow overriding integrity (#1791) --- src/runtime/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/cache.ts b/src/runtime/cache.ts index b331ff750b..6b0e400868 100644 --- a/src/runtime/cache.ts +++ b/src/runtime/cache.ts @@ -51,7 +51,7 @@ export function defineCachedFunction( // Normalize cache params const group = opts.group || "nitro/functions"; const name = opts.name || fn.name || "_"; - const integrity = hash([opts.integrity, fn, opts]); + const integrity = opts.integrity || hash([fn, opts]); const validate = opts.validate || (() => true); async function get(