Skip to content

Commit

Permalink
fix(cache): allow overriding integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 5, 2023
1 parent 2606a83 commit dda1e43
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 dda1e43

Please sign in to comment.