Skip to content

Commit

Permalink
fix(cache): allow overriding integrity (#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Oct 5, 2023
1 parent 53a96ad commit 6c51546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function defineCachedFunction<T, ArgsT extends unknown[] = unknown[]>(
// 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(
Expand Down

0 comments on commit 6c51546

Please sign in to comment.