Skip to content

Commit

Permalink
clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
RhysSullivan committed Oct 21, 2024
1 parent b342d99 commit cd4051f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/unstable-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {cache} from "react";

type Callback<T> = (...args: any[]) => Promise<T>;


// next_unstable_cache doesn't handle deduplication, so we wrap it in React's cache
export const unstable_cache = <T>(callback: Callback<T>, key: string[], options: {revalidate: number}) => cache(
next_unstable_cache(callback, key, options)
)

0 comments on commit cd4051f

Please sign in to comment.